Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call Macro jswalsh33 Excel Discussion (Misc queries) 2 February 21st 10 10:38 AM
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
macro call Steve Excel Discussion (Misc queries) 12 August 25th 06 04:27 AM
How to call a macro in an XLA add-in Peter Laman Excel Discussion (Misc queries) 1 March 10th 05 05:40 PM


All times are GMT +1. The time now is 05:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"