Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having trouble deleting worksheets containing ActiveX
controls whilst maintaining the values in publicly declared variables. EG. Create two worksheets, each with two command buttons on. On Sheet2, put in the following VBA code: Code:
Option Explicit public bln as boolean Private Sub CommandButton1_Click bln = True Application.DisplayAlerts = False Sheets("Sheet1").Delete Application.DisplayAlerts = True End Sub Private Sub CommandButton2_Click msgbox bln End Sub button 2. It SHOULD display 'TRUE', but it actually displays 'FALSE' as the publicly declared variable bln has been cleared. Anyone have any ideas? Thanks, alex |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Tab between ActiveX controls | Excel Discussion (Misc queries) | |||
ActiveX controls | Excel Discussion (Misc queries) | |||
ActiveX Controls vs Form Controls | Excel Discussion (Misc queries) | |||
ActiveX Controls | Excel Programming | |||
Deleting ActiveX Controls | Excel Programming |