Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform initialization problem
I have a workbook with a worksheet that contains the following
beforerightclick code: Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) Cancel = True SummaryForm.Show End Sub The userform, SummaryForm, has a lot of code, and ends with: Private Sub UserForm_Initialize() Dim i As Integer Dim j As Integer .. .. .. MultiPage1.Value = 0 MsgBox "end of userform initialize code" End Sub When I right click on the sheet, I get the "end of userform initialize code" (which I added as a test), the userform appears, then I immediately get taken to the debug mode on the "SummaryForm.Show" line. I don't even get the usual offer of "Debug or Cancel". Also, at that point I can not use F8 to step through the code. It is basically frozen until I break out. The code is in a file that is used as a template. I have lots of files, none of them had the problem before, and now they all have the same symptoms, so I don't think it is a data problem since the files are all self contained with no external links. Does anyone have any ideas? Thanks Ken |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform initialization problem
I don't see anything in the snippet of code you posted that would cause trouble.
If you set a breakpoint inside the _beforerightclick procedure, then maybe you can step through the code from there. Ken wrote: I have a workbook with a worksheet that contains the following beforerightclick code: Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) Cancel = True SummaryForm.Show End Sub The userform, SummaryForm, has a lot of code, and ends with: Private Sub UserForm_Initialize() Dim i As Integer Dim j As Integer . . . MultiPage1.Value = 0 MsgBox "end of userform initialize code" End Sub When I right click on the sheet, I get the "end of userform initialize code" (which I added as a test), the userform appears, then I immediately get taken to the debug mode on the "SummaryForm.Show" line. I don't even get the usual offer of "Debug or Cancel". Also, at that point I can not use F8 to step through the code. It is basically frozen until I break out. The code is in a file that is used as a template. I have lots of files, none of them had the problem before, and now they all have the same symptoms, so I don't think it is a data problem since the files are all self contained with no external links. Does anyone have any ideas? Thanks Ken -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform initialization problem
Dave, thanks for taking the time to consider my problem.
The problem went away after I installed some Microsoft updates. It seems a little odd that things worked, then suddenly stopped working without me doing anything I was aware of, then went away when I did an update; but, I am glad it is back in order. I need to learn a little more about breakpoints to help my troubleshooting. Ken |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveX Progress bar initialization in Excel 2003 problem | Excel Programming | |||
UserForm Initialization | Excel Programming | |||
Userform Initialization | Excel Programming | |||
ShowDataForm Initialization | Excel Programming | |||
List box initialization | Excel Programming |