Bercilak
02-20-2010, 09:15 PM
Work mostly in Excel and certainly miss the ability to record. I have a presentation which I am building from a macro. I am using a slide as a section separator and am trying to change the color of the rows. If I manually select the table prior to running the script, everything works as expected, however, if I do not select it first, it does not work.
The error I receive is:
Run-time error '-2147188160 (80048240)
Selection(unknown memeber): Invalud request. Nothing appropriate is currently selected.
Here is my script:
Sub tablecolor()
ActiveWindow.View.GotoSlide (17)
Dim Z As Integer
Z = 5
ActiveWindow.Selection.ShapeRange(1).Select
With ActiveWindow.Selection.ShapeRange(1).Table
.Cell(Z, 1).Shape.Fill.ForeColor.RGB = RGB(111, 131, 68)
.Cell(Z, 2).Shape.Fill.ForeColor.RGB = RGB(111, 131, 68)
End With
End Sub
Does anyone have ANY ideas...I have searched through quite a bit of posts, but nothing describing this error.
Thanks in advance.
The error I receive is:
Run-time error '-2147188160 (80048240)
Selection(unknown memeber): Invalud request. Nothing appropriate is currently selected.
Here is my script:
Sub tablecolor()
ActiveWindow.View.GotoSlide (17)
Dim Z As Integer
Z = 5
ActiveWindow.Selection.ShapeRange(1).Select
With ActiveWindow.Selection.ShapeRange(1).Table
.Cell(Z, 1).Shape.Fill.ForeColor.RGB = RGB(111, 131, 68)
.Cell(Z, 2).Shape.Fill.ForeColor.RGB = RGB(111, 131, 68)
End With
End Sub
Does anyone have ANY ideas...I have searched through quite a bit of posts, but nothing describing this error.
Thanks in advance.