LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Excel Worksheet

Howdy,

I am trying to minulipate this worksheet so once I enter data into the form
I would like to display the data for each form into a specific cell and then
be able to print each worksheet seperatly.

Example I enter the 14 bits of information and click the button and each
time I enter the info it populates 14 seperate cells on a new worksheet.
then I would like to be able to print each work sheet completly with one
click of a print button.

Can anyone point me in the right direction as these formulas are like a new
language to me and I really can't get the picture. I was able to find some
macros on the web and minulipate them to this poit to meet my needs.


Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("PartsData")

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

'check for a part number
If Trim(Me.txtUIC.Value) = "" Then
Me.txtUIC.SetFocus
MsgBox "Please enter The Equipment Control Data"
Exit Sub
End If

'copy the data to the database
ws.Cells(iRow, 1).Value = Me.txtUIC.Value
ws.Cells(iRow, 2).Value = Me.txtNIIN.Value
ws.Cells(iRow, 3).Value = Me.txtYr_MFG.Value
ws.Cells(iRow, 4).Value = Me.txtFSC.Value
ws.Cells(iRow, 5).Value = Me.TxtGL_CD.Value
ws.Cells(iRow, 6).Value = Me.TxtStatus.Value
ws.Cells(iRow, 7).Value = Me.TxtTrans_CD.Value
ws.Cells(iRow, 8).Value = Me.TxtMFG_CD.Value
ws.Cells(iRow, 9).Value = Me.TxtReg_NUM.Value
ws.Cells(iRow, 10).Value = Me.TxtUTIL_CD.Value
ws.Cells(iRow, 11).Value = Me.TxtSERIAL_NUM.Value
ws.Cells(iRow, 12).Value = Me.TxtCONTR_NUM.Value
ws.Cells(iRow, 13).Value = Me.TxtUPDT_BY.Value
ws.Cells(iRow, 14).Value = Me.TxtDT_TRANS.Value

'clear the data
Me.txtUIC.Value = ""
Me.txtNIIN.Value = ""
Me.txtYr_MFG.Value = ""
Me.txtFSC.Value = ""
Me.TxtGL_CD.Value = ""
Me.TxtStatus.Value = ""
Me.TxtTrans_CD.Value = ""
Me.TxtMFG_CD.Value = ""
Me.TxtReg_NUM.Value = ""
Me.TxtUTIL_CD.Value = ""
Me.TxtSERIAL_NUM.Value = ""
Me.TxtCONTR_NUM.Value = ""
Me.TxtUPDT_BY.Value = ""
Me.TxtDT_TRANS.Value = ""
Me.txtUIC.SetFocus

End Sub

Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, _
CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
MsgBox "Please use the button!"
End If
End Sub




Thanks,

Scott
 
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
My desktop worksheet shortcut will not open the Excel Worksheet Steve09 Excel Discussion (Misc queries) 2 September 17th 09 04:33 PM
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Excel Worksheet Functions 2 September 7th 06 05:05 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM
Linking Formulas, Worksheet to Worksheet - Excel 2003 windsong Excel Discussion (Misc queries) 2 November 14th 05 01:37 AM
How to link Excel worksheet tab names to dates in each worksheet? Pat Excel Worksheet Functions 9 January 31st 05 07:51 AM


All times are GMT +1. The time now is 03:22 PM.

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"