Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

control excel VBA macro with a VB 05-designed UI

Status
Not open for further replies.

dgr7

IS-IT--Management
Dec 29, 2006
43
US
hello,
I have many workbooks that I receive from clients I run various Excel VBA macros on depending on which workbook it is, and I need to automate all of this so that I can run an simple .exe user interface designed in VB 2005 Express Edition where when that interface is run, a small window opens on the desktop with a group of buttons, when the user clicks one of the buttons, Excel launches loads the appropriate file and runs an already-existing appropriate Excel macro, then some file maintenance is done, like moving a group of files from one subdirectory to another.
I'm new to VB and don't know where to start to make this happen. Could someone show me how to do this/where to begin?
thanks in advance,
david
 
I'm not sure because this is from VB 2003, but here it is:

Code:
'xl as an object
'all names and arguments are optional
xl.Run([MacroName],[Arg1], [Arg2],.....)

[code]

HTH

Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.
 
Ron,
thanks for the code! that's very similar to what I received from someone on another message board and it worked well in VB 6, then I auto-coverted it to VB.net 2005 and it still functioned properly
thanks,
david
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top