View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
prodsched[_5_] prodsched[_5_] is offline
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