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: 2
Default Excel data display userform problem

Hello,

I have a simple spreadsheet that gathers data from a data input userform
I've created. After all the data is input I want to be able to call another
userform that will allow me to scroll through the data line by line and
display the data in labeled text boxes. I have the userform all set up and
all the boxes named appropriately but for some reason my GetData sub is not
working. Basically if the user selects row 3 I need to have all the data
pulled from row 3 and placed in the appropriate boxes on the userform for
review. Code is below, any help greatly appreciated!

Code block

Private Sub GetData()

Dim r As Long

If IsNumeric(RowNumber.Text) Then
r = (RowNumber.Text)

Else
ClearData
MsgBox "Illegal row number"
Exit Sub

End If

If r 1 And r <= LastRow Then
EquipmentID.Text = Cells(r, 1)
Nomenclature.Text = Cells(r, 2)
InspType.Text = Cells(r, 3)
InspInt.Text = Cells(r, 4)
DateLastInsp.Text = FormatDateTime(Cells(r, 5), vbShortDate)
NextInspDue.Text = FormatDateTime(Cells(r, 6), vbShortDate)
DaysUntilDue.Text = Cells(r, 7)
DisableSave

ElseIf r = 1 Then
ClearData

Else
ClearData
MsgBox "Invalid row number"

End If

End Sub

Code block

Again, thank you for your input!

~Lucas
 
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
Help !, problem updating data through userform ! Pierre[_18_] Excel Programming 1 December 10th 07 02:38 PM
display status bar value in excel userform? Al B Excel Discussion (Misc queries) 0 November 15th 06 01:21 PM
Data Entry and Display problem [email protected] Excel Programming 1 June 7th 06 06:21 PM
Listbox data display problem Henry[_8_] Excel Programming 7 November 11th 05 11:59 PM
Hide excel, display userform only carlito_1985[_7_] Excel Programming 1 September 22nd 05 09:01 AM


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