Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet subroutine causes Compile error: Not found when on User
Attempts to execute a subroutine (or function) defined on a worksheet module
fail with compile error: sub - function not found. The sub works fine when called from another worksheet. I open the user form nonmodally to allow worksheet tasks. I have checked the spelling of the subroutine and it is defined as Public. Thanks, Jim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet subroutine causes Compile error: Not found when on User
Preface the call with a reference to the worksheet where the routine is
stored. Call Sheets("Sheet1").Myprocedure or Call Sheet1.Myprocedure -- HTH... Jim Thomlinson "Jim Brownson" wrote: Attempts to execute a subroutine (or function) defined on a worksheet module fail with compile error: sub - function not found. The sub works fine when called from another worksheet. I open the user form nonmodally to allow worksheet tasks. I have checked the spelling of the subroutine and it is defined as Public. Thanks, Jim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet subroutine causes Compile error: Not found when on U
Works great. I should have though of that, but am following examples in Jeff
Webb & Seve Saunders new book: Programming Excel with vba & .net from O'rielly- pgs 802+. Their examples show just the sub or function name (not qualified by the sheet name). Other than this minor problem, great book. Much Thanks, Jim "Jim Thomlinson" wrote: Preface the call with a reference to the worksheet where the routine is stored. Call Sheets("Sheet1").Myprocedure or Call Sheet1.Myprocedure -- HTH... Jim Thomlinson "Jim Brownson" wrote: Attempts to execute a subroutine (or function) defined on a worksheet module fail with compile error: sub - function not found. The sub works fine when called from another worksheet. I open the user form nonmodally to allow worksheet tasks. I have checked the spelling of the subroutine and it is defined as Public. Thanks, Jim |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet subroutine causes Compile error: Not found when on U
You do not have to reference a module, but you do neet to explicitly
reference sheets and ThisWorkbook to use their procedures. -- HTH... Jim Thomlinson "Jim Brownson" wrote: Works great. I should have though of that, but am following examples in Jeff Webb & Seve Saunders new book: Programming Excel with vba & .net from O'rielly- pgs 802+. Their examples show just the sub or function name (not qualified by the sheet name). Other than this minor problem, great book. Much Thanks, Jim "Jim Thomlinson" wrote: Preface the call with a reference to the worksheet where the routine is stored. Call Sheets("Sheet1").Myprocedure or Call Sheet1.Myprocedure -- HTH... Jim Thomlinson "Jim Brownson" wrote: Attempts to execute a subroutine (or function) defined on a worksheet module fail with compile error: sub - function not found. The sub works fine when called from another worksheet. I open the user form nonmodally to allow worksheet tasks. I have checked the spelling of the subroutine and it is defined as Public. Thanks, Jim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compile error: Method or data member not found | Excel Worksheet Functions | |||
Compile Error Method or data member not found | Excel Programming | |||
Compile Error: Method or data member not found | Excel Programming | |||
Compile Error: Method or data member not found | Excel Programming | |||
Compile Error: Method or data member not found | Excel Programming |