Thread
:
Getting sheet to find data
View Single Post
#
2
Posted to microsoft.public.excel.programming
Jim Cone
external usenet poster
Posts: 3,290
Getting sheet to find data
Dan,
Dim z as Long
'--
Do Until Me.Cells(z, 1).Text = Me.Shapes("txtDate").TextFrame.Characters.Text
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"Dan V" <Dan
wrote in message
Hi everyone
I'm designing a meeting room booker and I have created a form for users to
interact with. On the form is a date/time picker, a hidden text box and
several labels.
The idea is this: the user chooses the date, the text box fills with the
chosen date from the date picker. Using the date in the text box, the labels
(each representing a time slot) retrieve the value of a cell in a worksheet
(where all the data will be stored) corresponding to the relevant date.
However, it falls fown when trying to find the row relevant to the date they
are searching for...
Private Sub btnCheck_Click()
z = 1
Do Until Sheet1.Cells(z, 1) = txtDate.Value
z = z + 1
Loop
frmBooker.lbl8slot.Caption = Sheet1.Cells(z, 2)
End Sub
I get a runtime error 1004. Any help would be gratefully appreciated.
Thanks
Dan
Reply With Quote
Jim Cone
View Public Profile
Find all posts by Jim Cone