View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stella Artois Drinker Stella Artois Drinker is offline
external usenet poster
 
Posts: 1
Default problem w/ vb -control

The problem is that the vba doesnt care about if you can
make it match.

Do you work for a circus by the way!

Roll Up Roll Up


-----Original Message-----
Please Help!

I have a textbox where a user can type a date and a

calculate button a
user can press to look at all sheets in workbook and if

the date in the
textbox matches a date in a cell on a worksheet then it

copies text
from the sheet and pastes it in another location.

My problem is, I cannot make my vba recognize that the

date in the
textbox matches the date in the cell (even when they do)

Thanks in advance for your help!

My code is below:

Private Sub CalculateButton_Click()
For i = 3 To Sheets.Count
Sheets(i).Select
If ActiveSheet.Range("b1") = DateUpdateTextBox.Value Then
ActiveSheet.Range("b18:c18").Copy
ActiveWorkbook.Sheets("Rollup").Activate
ActiveWorkbook.Sheets("Rollup").Unprotect
Range("f2").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.PasteSpecial xlPasteValues
Else
End If
Next
End Sub


---
Message posted from http://www.ExcelForum.com/

.