Hi all,
I need to run a silly little macro from a command button in VB.
This is the macro from excel:
its just a cut and paste thingy.Code:Sub Macro1() ' ' Macro1 Macro ' Macro recorded 21/01/2002 by MAGrosoft ' ' Keyboard Shortcut: Ctrl+q ' Range("A1:A6").Select Selection.Copy Workbooks.Open Filename:="C:\My Documents\Book2.xls" Range("A1").Select ActiveSheet.Paste Range("C5").Select End Sub
what I want is to be able to call that macro from VB
Any suggestions as to how I do that?
could I dim variabvles in this macro (VBA) so that I can change the selections and filenames, and then pass the parameters from VB across to the VBA macro?
Thanks in advance




Reply With Quote