Sorry if asked before but it seems I've forgotten what I have done.
is it possible to combine letters and numbers in a string?
I can not make the code below no matter how I write it. Am I right in thinking this can not be done? I have tried declaring cnt as an integer but that does not work.
Private Sub CommandButton2_Click()
Dim sht As String
Dim cnt As String
Dim bth As String
sht = "sheet"
cnt = "1"
bth = sht + cnt
If ActiveSheet.Name = bth Then
MsgBox ("hi")
End If
End Sub
thank you
smiler44
is it possible to combine letters and numbers in a string?
I can not make the code below no matter how I write it. Am I right in thinking this can not be done? I have tried declaring cnt as an integer but that does not work.
Private Sub CommandButton2_Click()
Dim sht As String
Dim cnt As String
Dim bth As String
sht = "sheet"
cnt = "1"
bth = sht + cnt
If ActiveSheet.Name = bth Then
MsgBox ("hi")
End If
End Sub
thank you
smiler44