ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Class, WithEvents and auto-instanciating (https://www.excelbanter.com/excel-programming/276135-re-using-class-withevents-auto-instanciating.html)

Tetsuya Oguma[_2_]

Using Class, WithEvents and auto-instanciating
 
Hello Chip.

Nice to hear from you again after a looong time :-)

In your unsuccessful code, are you ever creating an

instance of Class1?
YES and only once for this.

Private Sub Workbook_Open()
Set App = New Class1
Set App.my_app = Application
End Sub

Yes this does the trick and I am shameful of not thinking
properly... Oh Friday lunchtime (Sydney time)... Go for a
pint of beer!

Thanks again. See ya around
---
Tetsuya


All times are GMT +1. The time now is 12:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com