Trusted Members
October 17, 2018
Good morning (at least on my side of the globe)
Below is the workbook open event and it doesn't trigger.
ThisWorkbook is renamed to CSVWorkBook and I've done it with many other workbooks and no issues except for this one.
Events are enabled and calculation is et to automatic, there's a listobject in the worksheet that's activated
Begin_here is the macro I run when it opens
I googled and found the workaround to trigger it but I don't like that solution
Any ideas? tips?
[code]
Option Explicit
' private variable
Private wbOpenEventRun As Boolean
Private Sub Workbook_Open()
wbOpenEventRun = True
With Worksheets("Admin")
.Range("B1").Value = CSVWorkbook.Name
.Range("G1").Value = CSVWorkbook.Path & Application.PathSeparator
End With
Begin_here
Application.StatusBar = CaptionTxt(True)
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If Not wbOpenEventRun Then Workbook_Open
wbOpenEventRun = True
' perform tasks in reaction of selection change events, if required
End Sub
[/code]
Trusted Members
October 17, 2018
Update: I added a Public Sub Auto_Open (instead of Private) and just invoked the macro Begin_Here again, then it works but what really bugs me is that I quite using Auto_Open a long time ago and just depended on Workbook_Open event.
So, I still don't understand why it all at once quit working but, the workaround with Auto_Open does the trick for now, but I'm afraid that this might also mean that once Auto_Open is triggered the other is triggered once again
1 Guest(s)