• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Call sub in Excel ThisWorkbook module from VBS

I'm trying to execute a sub residing in an Excel workbook,
in the "ThisWorkbook" module, but the VBS file fails to
see the function "ConvertFormNumber". The following
is an example of my current code:

Set oXL = CreateObject("Excel.Application")
Set oBK = oXL.Workbooks.Add(argFullName)
oXL.Visible = True
oBK.Application.Run "ConvertFormNumber"

Can someone please correct my code above or
otherwise show an example of how to execute/call
a subroutine residing in the "ThisWorkbook" module
from a VBS file?

Thanks much in advance.

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)