Results 1 to 2 of 2

Data entering

Threaded View

  1. #1
    Registered User
    Join Date
    03-17-2009
    Location
    Queenstown, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    1

    Unhappy Data entering

    Hi there,

    Please could someone help as I am new to this and got stuck. Everything seems OK but the moment I hit Submit, I get an error "End If Without Block If"

    I would also like to add a date to the form (the current date) if possible.

    Your help would be greatly appreciated

    Thanks

    Here is my coding;

    Private Sub UserForm_Initialize()

    description.Value = ""

    With choName

    .AddItem "Belinda"
    .AddItem "Kassandra"
    .AddItem "Parth"
    .AddItem "Soo-Lee"
    .AddItem "Catherine"
    .AddItem "Julien"
    .AddItem "Saleen"
    .AddItem "Kalpesh"

    End With

    choName.Value = ""

    With choDepartment

    .AddItem "Reception"
    .AddItem "Housekeeping"
    .AddItem "Maintenance"

    End With

    choDepartment.Value = ""

    With choShift

    .AddItem "AM"
    .AddItem "PM"
    .AddItem "Night"

    End With

    choShift.Value = ""

    With choAction

    .AddItem "Ref to DM"
    .AddItem "Ref to HM"
    .AddItem "Pending"
    .AddItem "Solved"

    End With

    choAction.Value = ""



    End Sub

    Private Sub cmdCancel_Click()

    Unload Me

    End Sub

    Private Sub cmdClear_Click()

    Call UserForm_Initialize

    End Sub

    Private Sub cmdSubmit_Click()

    ActiveWorkbook.Sheets("DailyLog1").Activate
    Range("A1").Select

    Do

    If IsEmpty(ActiveCell) = False Then
    ActiveCell.Offset(1, 0).Select
    End If

    Loop Until IsEmpty(ActiveCell) = True

    ActiveCell.Value = choName.Value
    ActiveCell.Offset(0, 1) = choDepartment.Value
    ActiveCell.Offset(0, 2) = choShift.Value
    ActiveCell.Offset(0, 3) = description.Value
    ActiveCell.Offset(0, 4) = choAction.Value

    End If

    Range("A1").Select

    End Sub
    Last edited by hertzogb; 03-17-2009 at 04:58 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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