|
-
Dec 10th, 1999, 10:02 PM
#1
Thread Starter
Lively Member
Hello,
How can I activate a "Sub" (the sub is located in a module) in an Excell workbook with a vb5 aplication.
for example:
this is Sub in Excell
Sub print_plan()
Call dbShopOrder.SearchOrders
Worksheets("plan").Activate
ActiveSheet.PrintOut
End Sub
greetings R@emdonck
[This message has been edited by R@emdonck (edited 12-11-1999).]
-
Dec 10th, 1999, 11:27 PM
#2
Hyperactive Member
Here's a VB sub I use to run an Excel sub routine. All of my Excel modules are in an Excel sheet named "Macros". This one runs
Sub LocValue().
Al.
Sub DataToExcel()
Set XLsheet = GetObject("c:\excel.xls\Macros.xls")
XLsheet.Application.Visible = True
XLsheet.Parent.Windows(1).Visible = True
XLsheet.Activate
XLsheet.Application.Run "'Macros.xls'!LocValue"
XLsheet.Application.Quit
Set XLsheet = Nothing
Exit Sub
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|