Hi,
Okay, I here expose my thickoness to you all...
In vba, how to I say correctly "If the current sheet is "mySheet1" then do this, otherwise, If the current sheet is "mySheet2" then do that?
Thanks my, er, gurus
Hi,
Okay, I here expose my thickoness to you all...
In vba, how to I say correctly "If the current sheet is "mySheet1" then do this, otherwise, If the current sheet is "mySheet2" then do that?
Thanks my, er, gurus
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum
Hi Babydum,
Try this:
If ThisWorkbook.ActiveSheet.Name = "mySheet1" Then MsgBox "Active sheet is mySheet1" ElseIf ThisWorkbook.ActiveSheet.Name = "mySheet2" Then MsgBox "Active sheet is mySheet2" Else MsgBox "Neither mySheet1 or mySheet2" End If
Marcster.
Poifect! Thanks!!
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum