View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dan V Dan V is offline
external usenet poster
 
Posts: 1
Default Getting sheet to find data

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