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: 38
Default Filling a Form

I have a form with 78 TextBoxes on it and a WorkSheet with 78 Columns. I want
to fill the form with the data on a specific row of the WorkSheet. I've
written the following code but can't figure out why it doesn't work.

Public Sub LoadLongInfo3(ByVal selectedProject As String)
Dim databaseRow As Long
Dim Boxes As Integer
Dim BoxName As String
Set devdataSheet = Sheets("DevData")

'Find DataRows To Be Loaded Into Form
devdataSheet.Activate
devdataSheet.Cells.Find(What:=selectedProject,
After:=devdataSheet.Cells(1,1), LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, MatchCase:=True).Activate
databaseRow = ActiveCell.Row
'Load Data Into Form
For Boxes = 1 To 78
BoxName = "TempBox" & Boxes
BoxName.Value = devdataSheet.Cells(databaseRow, Boxes)
Next
End Sub

When I run this code I get error message Object Required and the codes stops
at the line:
BoxName.Value = devdataSheet,Cells(databaseRow, Boxes)

Any help would be appreciated.
 
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
Automate form filling TimeCreature Excel Discussion (Misc queries) 1 March 18th 11 09:28 AM
Form Filling Abhishek kedia Excel Discussion (Misc queries) 0 September 22nd 06 02:29 PM
Filling in a form from a list sweetsue516 Excel Discussion (Misc queries) 0 March 29th 06 06:50 PM
filling a form with an array JT Excel Programming 1 October 26th 05 04:11 PM
filling a form in webpage R.VENKATARAMAN Excel Discussion (Misc queries) 0 August 19th 05 08:51 AM


All times are GMT +1. The time now is 12:12 AM.

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

About Us

"It's about Microsoft Excel"