Hi group,
I've written some VBA code behind an Excel spreadsheet to check to see if another workbook is open. If it isn't open, I'm having the code open it for me. This works fine the first time the macro runs. However this same spreadsheet has a cell where a property number is changed. When this is done and it is time to run the macro for the second time, the second worbook never opens and I go into some kind of endless loop. Can someone suggest why this may be happening?
Here's the code I'm running to check to see if it's open and then to open it if it is not:
wbFile = "O:\Revenue Management\RM -- Specialty Select Brands\Weekly - 14 Day Forecast\" & scoreCard
On Error Resume Next
Set wBook = Workbooks("14D Scorecard.xlsx")
If wBook Is Nothing Then
Exit Sub
End If
FYI: "14D Scorecard.xlsx" is the second workbook that I've referred to above.
If you have some thoughts, I will greatly appreciate them. I've search the internet high and low and I can't find a reason why it would do this. Further, I'm not getting any kind of error message.
In advance, Thanks!
Don