On 2002-08-27 06:28, Jammer0816 wrote:
Ok...i see how the Conditional Formatting works now. How can I apply this to only occur after the OK button is clicked in the message box? I don't want the highlighted area to appear until after the button is clicked.
my VBA skills aren't that hot either, but try the following:
In the module you have the code for the message box put something like:
Dim stS As String
stS = "A1,B2,C3:D17"
MsgBox "You need to complete the information in cells " & stS
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=A1="""""
Selection.FormatConditions(1).Interior.ColorIndex = 6
A1,B2,C3:D13 is the range of cells that you need, a comma separates different Cells or blocks of cells.
Notice that I've used activate A1 (When I recorded it conditional part it was C3), this will be the cell at the Top Left of the cells you need.
Also notice that the Formula1 also refernces that cell, change as required.
You cen dump the Message Box part I used it for testing.
Hope this helps,