Calling Procedures on a Sheet


Posted by Todd on October 12, 2001 10:20 AM

I have a procedure in a module, and from it I need to call a procedure on a sheet. I have the procedure on the sheet defined as a Public Sub, but the module won't compile and gives a "Sub or Function Not Defined" error when I try to call the sheet procedure. I thought defining a sub as public meant you could call it from anywhere in the workbook?

Also, does anyone know how to control a textbox from a module? I've only been able to control it from a procedure on the same sheet.

Thanks...



Posted by Todd on October 12, 2001 11:22 AM

I figured it out

Aha! I solved my problem. Instead of trying to call it just by name, e.g. RunMe, I have to identify the sheet, like this: Sheet1.RunMe
That works for both procedures and txtBoxes, etc.