Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a way in VBA to check if a particular Sub exits inThisWorkbook?
I would like to be able to have my program check to see if a custom
Subroutine with a particular name exists in ThisWorkbook of VBA Project (Book1) and call it if it exists. Is there a way to do this? Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a way in VBA to check if a particular Sub exits in ThisWo
Dear Greg
Please refer http://www.cpearson.com/Excel/vbe.aspx If this post helps click Yes --------------- Jacob Skaria "Greg" wrote: I would like to be able to have my program check to see if a custom Subroutine with a particular name exists in ThisWorkbook of VBA Project (Book1) and call it if it exists. Is there a way to do this? Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Is there a way in VBA to check if a particular Sub exits in ThisWorkbook?
I would like to be able to have my program check to see if a custom Subroutine with a particular name exists in ThisWorkbook of VBA Project (Book1) and call it if it exists. Is there a way to do this? Well this method doesn't really 'test' if the Subroutine exists, but rather try to call the Subroutine, and then just continue if it doesn't exists: On Error Resume Next Application.Run "Name of Subroutine" On Error Goto 0 By using 'Application.Run' you'll also avoid any Compiler error if the Subroutine doesn't exists upon execution of your code. Hope this can solve your problem :-) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find if value exits in array | Excel Worksheet Functions | |||
If Search that Exits Sub or Ends If | Excel Programming | |||
Spacebar Exits Macro | Excel Programming | |||
Sub Exits Unexpectedly | Excel Programming | |||
graceful exits | Excel Programming |