Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call/Start Macro
From Excel 2000
I have created a fully functional code and user form in VB. I placed a command button on the excel sheet to start the macro. I tried to assign this macro to the button but no macros are listed i the list box when I go: Tools--Macro--Macros Nothing is listed there. How do I get to this macro? It is in the VB project modules folder. Going Nutz!! Thanks -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call/Start Macro
Well, it depends. Right click the button and select "View Code". Thi
should appear: Private Sub CommandButton1_Click() End Sub Just type the name of the subroutine inside it like so, if you ar calling a subroutine called "Foo": Private Sub CommandButton1_Click() Foo End Sub Or try: Private Sub CommandButton1_Click() Call Foo End Sub - Piku -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call/Start Macro
That's all a bit confused.
What is the relationship between the form and the button? What code do you have? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "prodsched " wrote in message ... From Excel 2000 I have created a fully functional code and user form in VB. I placed a command button on the excel sheet to start the macro. I tried to assign this macro to the button but no macros are listed in the list box when I go: Tools--Macro--Macros Nothing is listed there. How do I get to this macro? It is in the VB project modules folder. Going Nutz!! Thanks. --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Call/Start Macro
The button I placed on the excel spreadsheet is intended to call or mak
the form appear so it can be completed. Here is my code for the form. Private Sub Cancel_Click() Unload Me End Sub Private Sub Clear_Click() Call RMAFORM_Initialize End Sub Private Sub OK_Click() ActiveWorkbook.Sheets("RMA_TEST_FORM").Activate Range("A1").Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True ActiveCell.Value = txtRMA_number.Value ActiveCell.Offset(0, 1) = txtCustomer.Value ActiveCell.Offset(0, 2) = txtPO_REF_Number.Value ActiveCell.Offset(0, 3) = txtAddress_1.Value ActiveCell.Offset(0, 4) = txtAddress_2.Value ActiveCell.Offset(0, 5) = txtAddress_3.Value ActiveCell.Offset(0, 6) = txtAddress_4.Value ActiveCell.Offset(0, 7) = txtContact.Value ActiveCell.Offset(0, 8) = txtPhone.Value ActiveCell.Offset(0, 9) = txtFax.Value ActiveCell.Offset(0, 10) = txtE_Mail.Value ActiveCell.Offset(0, 11) = txtShip_Via.Value ActiveCell.Offset(0, 12) = txtWarranty_Repair.Value ActiveCell.Offset(0, 13) = txtNon_Warranty_Repair.Value ActiveCell.Offset(0, 14) = txtWarranty_Rework_Retro.Value ActiveCell.Offset(0, 15) = txtNon_Warranty_Rework_Retro.Value ActiveCell.Offset(0, 16) = txtPrevious_RMA.Value ActiveCell.Offset(0, 17) = txtCredit_Hold.Value ActiveCell.Offset(0, 18) = txtDate_Received.Value ActiveCell.Offset(0, 19) = cboProduct.Value ActiveCell.Offset(0, 20) = txtAssy_No.Value ActiveCell.Offset(0, 21) = txtSerial_No.Value ActiveCell.Offset(0, 22) = txtQuantity.Value ActiveCell.Offset(0, 23) = txtMFR_Date.Value ActiveCell.Offset(0, 24) = txtReported_Problem.Value ActiveCell.Offset(0, 25) = txtIncoming_Inspection_Notes.Value ActiveCell.Offset(0, 26) = txtSales_Order_No.Value Range("A1").Select End Sub Private Sub RMAFORM_Initialize() txtRMA_number.Value = "" txtCustomer.Value = "" txtPO_REF_Number.Value = "" txtAddress_1.Value = "" txtAddress_2.Value = "" txtAddress_3.Value = "" txtAddress_4.Value = "" txtContact.Value = "" txtPhone.Value = "" txtFax.Value = "" txtE_Mail.Value = "" txtShip_Via.Value = "" txtWarranty_Repair.Value = "" txtNon_Warranty_Repair.Value = "" txtWarranty_Rework_Retro.Value = "" txtNon_Warranty_Rework_Retro.Value = "" txtPrevious_RMA.Value = "" txtCredit_Hold.Value = "" txtDate_Received.Value = "" With cboProduct .AddItem "PCI350-AC" .AddItem "PCI350-48" .AddItem "PCI450" .AddItem "STF2000" .AddItem "DSS" .AddItem "SPORT" .AddItem "VXI" .AddItem "TTX40048" .AddItem "TTX40024" End With cboCRP_Code.Value = "" txtAssy_No.Value = "" txtSerial_No.Value = "" txtQuantity.Value = "" txtMFR_Date.Value = "" txtReported_Problem.Value = "" txtIncoming_Inspection_Notes.Value = "" txtSales_Order_No.Value = "" txtRMA_number.SetFocus End Sub Sub OpenRMAFORM_Form() frmRMAFORM.Show End Sub :confused -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Call Macro | Excel Discussion (Misc queries) | |||
How can run a macro ( call a macro) on selection of any filtercriteria? | Excel Worksheet Functions | |||
Call an Access macro from an Excel macro | Excel Discussion (Misc queries) | |||
macro call | Excel Discussion (Misc queries) | |||
How to call a macro in an XLA add-in | Excel Discussion (Misc queries) |