G
Guest
Hi,
I need an If statement that validates the name of the Excel Workbook that is
opened but I'm not sure how to complete it. I'm thinking something like
this...
Dim wbName As String 'holds the name of the opened workbook
wbName = Application.ActiveWorkbook.Name 'get the workbook name
If wbName = "BlankDataWorkbook.xls" Then 'verifies the name
Do This Stuff 'performs the action
Else 'if it isnt the name then do the following
Exit Sub 'exits the sub
End If 'close the if statement
Is this even close???
Thanks Much In Advance,
Rob
I need an If statement that validates the name of the Excel Workbook that is
opened but I'm not sure how to complete it. I'm thinking something like
this...
Dim wbName As String 'holds the name of the opened workbook
wbName = Application.ActiveWorkbook.Name 'get the workbook name
If wbName = "BlankDataWorkbook.xls" Then 'verifies the name
Do This Stuff 'performs the action
Else 'if it isnt the name then do the following
Exit Sub 'exits the sub
End If 'close the if statement
Is this even close???
Thanks Much In Advance,
Rob