HELP how can I do this PLEASE!!!!!!!!!!!

  • Thread starter Thread starter RocketMan
  • Start date Start date
R

RocketMan

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.
 
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
 
Hi RocketMan,

Perhaps you should be using your SClassModule's
App_WorkbookBeforeSave event procedure.
 
Back
Top