Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 10th 18, 11:37 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2018
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

  #2   Report Post  
Old January 16th 18, 07:32 PM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2015
Posts: 945
Default move data from a worksheet to another worksheet "form"

This sounds like a rather convoluted project that certainly could be simplified
and streamlined for better efficiency.

How many sheets in the workbook?

How many "Excel Forms" (I assume you mean Userforms)?
If multiple forms, why?

Is the facility name in 'Page 1'!C8 the same for all?

Can you upload this project so we can have a look at it?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
  #3   Report Post  
Old January 17th 18, 12:43 AM posted to microsoft.public.excel.programming
external usenet poster
 
First recorded activity by ExcelBanter: Jan 2018
Posts: 4
Default move data from a worksheet to another worksheet "form"

Right, no file no solution.

"GS" ???? news
This sounds like a rather convoluted project that certainly could be
simplified and streamlined for better efficiency.

How many sheets in the workbook?

How many "Excel Forms" (I assume you mean Userforms)?
If multiple forms, why?

Is the facility name in 'Page 1'!C8 the same for all?

Can you upload this project so we can have a look at it?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion





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
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 12:06 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017