LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default move data from a worksheet to another worksheet "form"

I have a worksheet 1 "Page 1" in which the name of the facility in C8. I have multi other worksheets that will be filled out by using "Excel Form". What I would like to happen is when they enter the data in one each of the many "Form" the facility name that is in worksheet 1 "Page 1" C8 would be automatically added to the txbox name txfacilty which would be added each time they press the enter button. Here is some of the code I am using to enter the data they enter.
I am trying to make sure each entry has there facility name.

Thanks for the help.

Private Sub cmdAdd1_Click()

Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Dry Chemicals")

'find first empty row in database
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

'copy the data to the database
ws.Cells(iRow, 1).Value = "Fire Fighting Equipment"
ws.Cells(iRow, 2).Value = "Dry Chemicals"
ws.Cells(iRow, 3).Value = Me.txtQuantity.Value
ws.Cells(iRow, 4).Value = Me.txtType.Value
ws.Cells(iRow, 5).Value = Me.txtPurpose.Value
ws.Cells(iRow, 6).Value = Me.txtDescription.Value
ws.Cells(iRow, 7).Value = Me.txtManufacturer.Value
ws.Cells(iRow, 8).Value = Me.cboOperatorSupplied.Value
ws.Cells(iRow, 9).Value = Me.txtLengthfeet.Value
ws.Cells(iRow, 10).Value = Me.txtFireFightingCapability.Value
ws.Cells(iRow, 11).Value = Me.txtPSI.Value
ws.Cells(iRow, 12).Value = Me.txtCylinderConnectionType.Value
ws.Cells(iRow, 13).Value = Me.txtTimeRating.Value
ws.Cells(iRow, 14).Value = Me.txtTypeofDryChemical.Value
ws.Cells(iRow, 15).Value = Me.txtAmountofAgent.Value
ws.Cells(iRow, 16).Value = Me.txtGPM.Value
ws.Cells(iRow, 17).Value = Me.txtGallonsStorage.Value
ws.Cells(iRow, 18).Value = Me.txtFoam.Value
ws.Cells(iRow, 19).Value = Me.txtDropTankingallons.Value
ws.Cells(iRow, 20).Value = Me.txtAerialLength.Value
ws.Cells(iRow, 21).Value = Me.txtExtinguishingAgent.Value
ws.Cells(iRow, 22).Value = Me.txtGroundLadders.Value
ws.Cells(iRow, 23).Value = Me.txtQuantityLength.Value
ws.Cells(iRow, 24).Value = Me.cboFourWheeledDrive.Value
ws.Cells(iRow, 25).Value = Me.txtKW.Value
ws.Cells(iRow, 26).Value = Me.txtNumberof110outlets.Value
ws.Cells(iRow, 27).Value = Me.txtNumberof220outlets.Value
ws.Cells(iRow, 28).Value = Me.cboFuelType.Value
ws.Cells(iRow, 29).Value = Me.cboPPELevel.Value
ws.Cells(iRow, 30).Value = Me.cboPPESize.Value
ws.Cells(iRow, 31).Value = Me.cboTransportby.Value
ws.Cells(iRow, 32).Value = Me.cboSpecialty.Value
ws.Cells(iRow, 33).Value = Me.cboHardSoft.Value
ws.Cells(iRow, 34).Value = Me.cboOutlet.Value
ws.Cells(iRow, 35).Value = Me.cboBoatDraft.Value
ws.Cells(iRow, 36).Value = Me.txtHoseDiameter.Value
ws.Cells(iRow, 37).Value = Me.cboHoseThreads.Value
ws.Cells(iRow, 38).Value = Me.cboMedicalLevel.Value
ws.Cells(iRow, 39).Value = Me.txFacility

'clear the data
Me.txtSubCategory.Value = ""
Me.txtResponseEquipment.Value = ""
Me.txtQuantity.Value = ""
Me.txtType.Value = ""
Me.txtPurpose.Value = ""
Me.txtDescription.Value = ""
Me.txtManufacturer.Value = ""
Me.cboOperatorSupplied.Value = ""
Me.txtLengthfeet.Value = ""
Me.txtFireFightingCapability.Value = ""
Me.txtPSI.Value = ""
Me.txtCylinderConnectionType.Value = ""
Me.txtTimeRating.Value = ""
Me.txtTypeofDryChemical.Value = ""
Me.txtAmountofAgent.Value = ""
Me.txtGPM.Value = ""
Me.txtGallonsStorage.Value = ""
Me.txtFoam.Value = ""
Me.txtDropTankingallons.Value = ""
Me.txtAerialLength.Value = ""
Me.txtExtinguishingAgent.Value = ""
Me.txtGroundLadders.Value = ""
Me.txtQuantityLength.Value = ""
Me.cboFourWheeledDrive.Value = ""
Me.txtKW.Value = ""
Me.txtNumberof110outlets.Value = ""
Me.txtNumberof220outlets.Value = ""
Me.cboFuelType.Value = ""
Me.cboPPELevel.Value = ""
Me.cboPPESize.Value = ""
Me.cboTransportby.Value = ""
Me.cboSpecialty.Value = ""
Me.cboHardSoft.Value = ""
Me.cboOutlet.Value = ""
Me.cboBoatDraft.Value = ""
Me.txtHoseDiameter.Value = ""
Me.cboHoseThreads.Value = ""
Me.cboMedicalLevel.Value = ""
Me.txFacility.Value = ""



End Sub
 
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
Turn off "CALCULATE" on bottom of Excel worksheet. near "Ready" chrispal86 Excel Discussion (Misc queries) 2 February 2nd 10 08:36 PM
How do i disable/enable "Worksheet Move or copy" option? Saon Excel Worksheet Functions 1 May 15th 08 06:30 PM
Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error [email protected] Excel Discussion (Misc queries) 4 September 25th 06 01:35 PM
"Move Method of Worksheet Class failed" azurmendi Excel Programming 4 November 3rd 05 02:59 PM
CommandBars("Worksheet Menu Bar").Controls("Tools").Enabled = Fals Arturo Excel Programming 3 May 26th 05 05:44 PM


All times are GMT +1. The time now is 08:14 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"