MsgBox cell address

A

A & S

Hi I am currently trying to inform the user if a certain cell needed
for the macro is empty, the code that I have works fine but it always
shows the cell address as $B$4 instead of B4. Is there a way that I
can get it to show the cell address without the dollar signs.

Here is my code.

If newSht = "" Then
MsgBox "There must be a fixture name present in cell " &
ActiveCell.Address
Exit Sub
End If


Thanks
 
L

Lars-Åke Aspelin

Hi I am currently trying to inform the user if a certain cell needed
for the macro is empty, the code that I have works fine but it always
shows the cell address as $B$4 instead of B4. Is there a way that I
can get it to show the cell address without the dollar signs.

Here is my code.

If newSht = "" Then
MsgBox "There must be a fixture name present in cell " &
ActiveCell.Address
Exit Sub
End If


Thanks


Try this modification:

MsgBox "There must be a fixture name present in cell " &
ActiveCell.Address(False, False)

Hope this helps / Lars-Åke
 
T

The Code Cage Team

Use this line:

Code
-------------------
MsgBox "There must be a fixture name present in cell " & Replace(ActiveCell.Address, "$", ""
-------------------

Hi I am currently trying to inform the user if a certain cell needed
for the macro is empty, the code that I have works fine but it always
shows the cell address as $B$4 instead of B4. Is there a way that I
can get it to show the cell address without the dollar signs.

Here is my code.

If newSht = "" Then
MsgBox "There must be a fixture name present in cell " &
ActiveCell.Address
Exit Sub
End If


Thank

--
The Code Cage Tea

Regards,
The Code Cage Team
'The Code Cage' (http://www.thecodecage.com
 
Top