Results 1 to 5 of 5

Should I use an IF statement?

Threaded View

okriskao Should I use an IF statement? 10-30-2008, 09:25 AM
Bob Phillips As I told you on MrExcel,... 10-30-2008, 09:39 AM
okriskao Ok Thanks, I'm going to do... 10-30-2008, 09:44 AM
royUK This is what annoys members... 10-30-2008, 09:47 AM
okriskao going to do that now too!... 10-30-2008, 09:53 AM
  1. #1
    Registered User
    Join Date
    10-17-2008
    Location
    Norcross, GA
    MS-Off Ver
    MS Excel 2007
    Posts
    35

    Should I use an IF statement?

    I have a userform where the user can type in info, choose a date in the combobox, and press OK. What i need is a code for the program to automatically find the date in my spreadsheet and put in the information in that row.

    What i have now is this: the code finds the next empty row and enters the info.

    Private Sub OKButton_Click()
    Range("C3").Select
    Do
    If IsEmpty(ActiveCell) = False Then
    ActiveCell.Offset(1,0).Select
    End If
    Loop Until IsEmpty(ActiveCell) = True
    ActiveCell.Value = textbox1.Value
    ActiveCell(0,1) = textbox2.Value
    ActiveCell(0,2) = textbox3.Value
    Unload Me
    End Sub
    But I really need a way for it to match the date from the combobox to the same date on my spreadsheet and select that cell on the spreadsheet! Will I be able to use an IF statement? If so, can u provide an example? Thank you.
    Last edited by okriskao; 10-30-2008 at 09:33 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1