I've got a module with two procedures. Procedure 1 calls procedure 2 and passes a worksheet reference. Procedure 2 does some work and then wants to call a procedure which is stored as code on the worksheet. Specifically sheetA has a routine called Format and sheetB has the same thing.
The whole thing looks like this:
In the module
-------------
sub proc1
call proc2(sheetA)
call proc2(sheetB)
end sub
sub proc2 (byref ws as worksheet)
call ws.Format
end sub
In sheetA code
--------------
sub Format
end sub
In sheetB code
--------------
sub Format
end sub
Unfortunately Excell refuses to run and claims that the statement:
call ws.Format
is invalid. The compiler message being:
Method or Data Member not found.
Any thoughts would be appreciated.
The whole thing looks like this:
In the module
-------------
sub proc1
call proc2(sheetA)
call proc2(sheetB)
end sub
sub proc2 (byref ws as worksheet)
call ws.Format
end sub
In sheetA code
--------------
sub Format
end sub
In sheetB code
--------------
sub Format
end sub
Unfortunately Excell refuses to run and claims that the statement:
call ws.Format
is invalid. The compiler message being:
Method or Data Member not found.
Any thoughts would be appreciated.