<--- thats me, right now
Okay here is the problem
I ahve a userform with a multipage control and a command button
frmSchedule and multipage1 and cmd_Add
I CANNOT add a page the multipage control WITHOUT excel crashing. Error handling does NOTHING. i can report the error but not stop excel from crashing.
My code is simple:
[vba]
Option Explicit 'Always have it
Sub cmd_Add_Click()
Dim newPage as Page
Set newPage = Me.MultiPage1.Pages.Add
End Sub
[/vba]
That should add a blank page. I cant even get it to do that. It won't.
I have tried declaring newPage the following ways:
[vba]
Dim newPage
Dim newPage as Page
Dim newPage as object
[/vba]
I Tried to invoke the function in the following ways:
[vba]
Set newPage = frmSchedule.MultiPage1.Pages.Add
Set newPage = Me.MultiPage1.Pages.Add
Set newPage = MultiPage1.Pages.Add
[/vba]
I have tried all combinations of all three and every time i get the same damn error:
Automation Error.
Object invoked in disconnected from its client.
Then excel crashes NO MATTER what i do..
The other week, the code worked fine. not a problem, must have added and delete several thousand pages during testing. Now... NOTHING.
Please help.. what is it doing..