Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,Cancel As
Boolean) Call SClassModule.SSave End Sub It will compile but If I try to save it, I get Error 424 Object Required. Yes, its in the ThisWorkbook module. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
U can not 'call' a class-module because it's an object.
What happens when you try this: Private CMod As SClassModule Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,Cancel As Boolean) Set CMod = New SClassModule CMod.SSave End Sub "RocketMan" schreef in bericht oups.com... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,Cancel As Boolean) Call SClassModule.SSave End Sub It will compile but If I try to save it, I get Error 424 Object Required. Yes, its in the ThisWorkbook module. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi RocketMan,
Perhaps you should be using your SClassModule's App_WorkbookBeforeSave event procedure. --- Regards, Norman "RocketMan" wrote in message oups.com... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,Cancel As Boolean) Call SClassModule.SSave End Sub It will compile but If I try to save it, I get Error 424 Object Required. Yes, its in the ThisWorkbook module. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
WHO HO!!!!!!!!!!!!!!!!!!!!!
THAT DID IT THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!! Norman Jones wrote: Hi RocketMan, Perhaps you should be using your SClassModule's App_WorkbookBeforeSave event procedure. --- Regards, Norman "RocketMan" wrote in message oups.com... Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,Cancel As Boolean) Call SClassModule.SSave End Sub It will compile but If I try to save it, I get Error 424 Object Required. Yes, its in the ThisWorkbook module. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|