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: 8
Default entering data into multiple sheets

Good morning,
I am entering data into a worksheet with a userform. I need to enter the
exact same information into another worksheet (2010). Is there a way to do
this without having to write the same code for the second worksheet? Thank
you in advance.
Ranae


Dim Wbk As Workbook
Set Wbk = Workbooks("Reworklog")
Sheets("2006-2010").Select

Dim LastRow As Object
Set LastRow = Range("a65536").End(xlUp)
LastRow.Offset(1, 0) = Me.TBRecDate
LastRow.Offset(1, 1) = Me.TbDate
LastRow.Offset(1, 2) = Me.TbBoardType
LastRow.Offset(1, 3) = Me.cboboard
LastRow.Offset(1, 5) = Me.TbBatch
LastRow.Offset(1, 6) = Me.TbSN
LastRow.Offset(1, 7) = Me.cboDefectCode
LastRow.Offset(1, 8) = Me.cboProdSpec
LastRow.Offset(1, 9) = Me.cboCM
LastRow.Offset(1, 10) = Me.cboTech
LastRow.Offset(1, 11) = Me.TBreject
LastRow.Offset(1, 12) = Me.TBfinding
LastRow.Offset(1, 13) = Me.TBAction
LastRow.Offset(1, 14) = Me.TBLocation
LastRow.Offset(1, 15) = Me.cboResults
LastRow.Offset(1, 16) = Me.cboDisposition
LastRow.Offset(1, 21) = Me.cboPN1
LastRow.Offset(1, 22) = Me.cboPN2
LastRow.Offset(1, 23) = Me.cboPN3
LastRow.Offset(1, 24) = Me.cboPN4
LastRow.Offset(1, 20) = Me.TbSum

If Me.OptDbug1.Value Then
LastRow.Offset(1, 25) = Me.OptDbug1.Caption
ElseIf Me.OptDBug2.Value Then
LastRow.Offset(1, 25) = Me.OptDbug1.Caption
Else
If Me.OptDbug3.Value Then
LastRow.Offset(1, 25) = Me.OptDbug1.Caption
End If
End If
'Clear fields for next entry
Me.TbSN = ClearContents
Me.cboDefectCode = ClearContents
Me.TBreject = ClearContents
Me.TBfinding = ClearContents
Me.TBAction = ClearContents
Me.TBLocation = ClearContents
Me.OptDbug1 = ClearContents
Me.OptDBug2 = ClearContents
Me.OptDbug3 = ClearContents
Me.cboResults = ClearContents
Me.cboDisposition = ClearContents
Me.cboPN1 = ClearContents
Me.cboPN2 = ClearContents
Me.cboPN3 = ClearContents
Me.cboPN4 = ClearContents
Me.Tbcost1 = ClearContents
Me.Tbcost2 = ClearContents
Me.tbCost3 = ClearContents
Me.TbCost4 = ClearContents
Me.TbSum = ClearContents
Me.TbSN.SetFocus
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
Entering multiple data into list Marty Excel Discussion (Misc queries) 1 November 15th 06 03:28 AM
entering same formula in multiple sheets AB Excel Worksheet Functions 1 October 30th 06 08:21 PM
Entering data on differnent sheets in WB STEVEB Excel Programming 1 September 16th 05 09:53 PM
Entering same data into multiple cells Gary H Excel Discussion (Misc queries) 3 April 14th 05 09:55 PM
Entering Data in multiple cells on one sheet & having it auto upda haynblend Excel Worksheet Functions 2 March 27th 05 12:41 AM


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