Results 1 to 3 of 3

Userform issues

Threaded View

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    Birmingham
    MS-Off Ver
    Excel 2003
    Posts
    25

    Userform issues

    Hi there

    I have a 2 part question that I am slightly puzzled by (I know this will seem like a day 1 beginners question for you).
    I am using a userform with 4 textboxes to extract information from a worksheet using information in textbox 1. 1 box looks up a date but returns the date in numerical format (42682) instead of dd/mm/yyyy. The date is formatted correctly in the worksheet, but will not extract correctly to the userform. The code I'm using is:

    If WorksheetFunction.CountIf(Sheet1.Range("D:D"), Me.KSTextBox.Value) = 0 Then
     MsgBox "This Knowledge Article does not exist"
     Me.KSTextBox.Value = ""
     Exit Sub
     End If
     
     With Me
     .DateTextBox = Application.WorksheetFunction.VLookup(Me.KSTextBox, Sheet1.Range("D2:K1000"), 4, 0)
     .SkillTextBox = Application.WorksheetFunction.VLookup(Me.KSTextBox, Sheet1.Range("D2:K1000"), 6, 0)
     .VersionTextBox = Application.WorksheetFunction.VLookup(Me.KSTextBox, Sheet1.Range("D2:K1000"), 8, 0)
     
     End With
     End Sub
    I tried this code after the With Me command -
    .DateTextBox = Application.WorksheetFunction.VLookupCDate(Me.KSTextBox), Sheet1.Range("D2:K1000"), 4, 0)
    but this returns a faulty code line

    The 2nd part of the question is, when I get the result, how do I change the date in the same cell that the result has extracted from if I need to update the date by overwriting in the result box? I'm sure the VLOOKUP function will not work on this
    Last edited by neilsy1; 08-17-2016 at 06:01 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Userform Issues
    By Rosco88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2015, 09:24 AM
  2. Userform issues
    By xia0jj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2014, 03:13 AM
  3. [SOLVED] VLookup in UserForm VBA issues
    By wanamaa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2013, 12:22 PM
  4. UserForm-Listbox-Issues, Data To & From Excel Cells Not Working; Null Values
    By Kalithro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2013, 12:43 AM
  5. userform.show issues
    By ag273n in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-30-2013, 11:47 PM
  6. USERFORM - Issues Log Template
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-26-2013, 09:50 AM
  7. Userform filter issues
    By kryt0n in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2010, 10:06 AM

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