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

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.
 
M

moon

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
 
N

Norman Jones

Hi RocketMan,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top