tljenkin
Board Regular
- Joined
- Jun 14, 2007
- Messages
- 147
Hi All,
I have the following code below. If the user says yes when in fact the file is not open, I want excel to prompt a message "Sorry appears file is not open, try again". Otherwise continue as normal.
Please help!
Sub UpdateDatabase()
Dim FileToBeOpened As Variant, File As Variant, Ard As Workbook, Wrr As Workbook
Set Ard = ThisWorkbook ' or Actuals repository current version presently open
Application.ScreenUpdating = False
Dim Response As Integer
Response = MsgBox(prompt:="Is the most recent weekly Redress report open?", Buttons:=vbYesNo)
If Response = vbYes Then
For Each Wrr In Application.Workbooks
If Wrr.Name Like "Week*" Then Wrr.Activate
Next Wrr
Set Wrr = ActiveWorkbook
I have the following code below. If the user says yes when in fact the file is not open, I want excel to prompt a message "Sorry appears file is not open, try again". Otherwise continue as normal.
Please help!
Sub UpdateDatabase()
Dim FileToBeOpened As Variant, File As Variant, Ard As Workbook, Wrr As Workbook
Set Ard = ThisWorkbook ' or Actuals repository current version presently open
Application.ScreenUpdating = False
Dim Response As Integer
Response = MsgBox(prompt:="Is the most recent weekly Redress report open?", Buttons:=vbYesNo)
If Response = vbYes Then
For Each Wrr In Application.Workbooks
If Wrr.Name Like "Week*" Then Wrr.Activate
Next Wrr
Set Wrr = ActiveWorkbook