Results 1 to 10 of 10

UserForm help

Threaded View

  1. #1
    Registered User
    Join Date
    05-09-2011
    Location
    california
    MS-Off Ver
    Excel 2003
    Posts
    48

    UserForm help

    im very new to user forms and am not sure if this is possible, but this is my aim.

    this is what I have so far:

    Private Sub Label1_Click()
    
    End Sub
    
    Private Sub Label2_Click()
    
    End Sub
    
    Private Sub cmdAdd_Click()
    Dim iRow As Long
    Dim ws As Worksheet
    Set ws = Worksheets("Sheet4")
    
    'find first empty row in database
    iRow = ws.Cells(Rows.Count, 23) _
      .End(xlUp).Offset(1, 0).Row
    
    'check for a date number
    If Trim(Me.txtDate.Value) = "" Then
      Me.txtDate.SetFocus
      MsgBox "Please enter a Date"
      Exit Sub
    End If
    
    'copy the data to the database
    ws.Cells(iRow, 23).Value = Me.txtDate.Value
    ws.Cells(iRow, 24).Value = Me.txtReason.Value
    ws.Cells(iRow, 25).Value = Me.txtPoints.Value
    
    'clear the data
    Me.txtReason.Value = ""
    Me.txtPoints.Value = ""
    Me.txtDate.SetFocus
    End Sub
    
    Private Sub formClose_Click()
      Unload Me
    End Sub
    
    
    Private Sub UserForm_Click()
    
    End Sub
    
    Private Sub UserForm_QueryClose(Cancel As Integer, _
      CloseMode As Integer)
      If CloseMode = vbFormControlMenu Then
        Cancel = True
        MsgBox "Please use the button!"
      End If
    End Sub
    this works fine. I now want to add another txt box, and the input is entered into a calendar (psuedo calander) its just cells a-m (jan-dec) and 1-33 for the day.

    so say then enter the date 5/72011 their code gets put in that cell

    date:5/7/2011
    reason: sick
    points:5
    code: AC (this is the portion i want to show on the psuedo calendar)

    the file is attached. thanks much
    Attached Files Attached Files
    Last edited by messiah166; 05-11-2011 at 01:00 PM.

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