G
GTyson2
Ok I'm getting a subscript out of range when I'm trying to see if a workbook
is open. The file name for the workbook relates to the sheet that is
currently in use. The following is my code (Simplified of course) can someone
please help me get this working.
Thanks in advance.
Dim ThisWB As String
Dim PropName As String
Dim AcctType As String
Dim Today As String
ThisWB = ThisWorkbook.Name
PropName = ActiveSheet.Range("Prop_Name").Value
AcctType = ActiveSheet.Range("Account_Type").Value
Today = Format(Date, "MMddyyyy")
Dim NewWBN As String
NewWBN = "IMCashbook_" & PropName & "_" & AcctType & "_" & Today & ".xls"
Application.ScreenUpdating = False
If Workbook(NewWBN) Is Nothing Then
MsgBox ("New workbook is open")
ElseIf Not (Workbook(NewWBN) Is Nothing) Then
MsgBox ("New workbook is not open")
is open. The file name for the workbook relates to the sheet that is
currently in use. The following is my code (Simplified of course) can someone
please help me get this working.
Thanks in advance.
Dim ThisWB As String
Dim PropName As String
Dim AcctType As String
Dim Today As String
ThisWB = ThisWorkbook.Name
PropName = ActiveSheet.Range("Prop_Name").Value
AcctType = ActiveSheet.Range("Account_Type").Value
Today = Format(Date, "MMddyyyy")
Dim NewWBN As String
NewWBN = "IMCashbook_" & PropName & "_" & AcctType & "_" & Today & ".xls"
Application.ScreenUpdating = False
If Workbook(NewWBN) Is Nothing Then
MsgBox ("New workbook is open")
ElseIf Not (Workbook(NewWBN) Is Nothing) Then
MsgBox ("New workbook is not open")