Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can't get the portion of below code **"test and provide for blank cells"
** to work properly. Can someone assist? TIA, Sub demo() Dim rSource As Range ' the area to be "viewed" Dim rCell As Range ' for looping through the view Dim msg As String ' body of the message Dim title As String ' title of the message Set rSource = Range("D5:H15") For Each rCell In rSource ' initialise message variables title = "row: %R" msg = "Address: %A " & Chr(10) & "Value: %V" ' populate message variables title = Replace(title, "%R", rCell.Row) msg = Replace(msg, "%A", rCell.Address) msg = Replace(msg, "%V", rCell.Value) ' test and provide for blank cells If rCell.Value = "" Then msg = Replace(msg, rCell.Value, "The Cell is Blank") End If ' show message & test for user cancel If MsgBox(msg, vbOKCancel, title) = _ vbCancel Then Exit For End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sum by coding | New Users to Excel | |||
How to fix the coding? | Excel Worksheet Functions | |||
How to fix the coding? | Excel Worksheet Functions | |||
VBA coding needed badly | New Users to Excel | |||
Help needed coding a macro to adjust the source of information each time it is run | Excel Programming |