+ Reply to Thread
Results 1 to 3 of 3

Textbox data with quotations

  1. #1
    Registered User
    Join Date
    10-27-2009
    Location
    Georgia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Textbox data with quotations

    I am using textboxes on a UserForm to populate cells in a worksheet, however, this data needs to be enclosed with quotations once it is in the active cell of the worksheet. I have the following code to put data (Start Date) in cell C3 but how can I get the date to be enclosed with quotations (i.e "10/27/09")

    Private Sub txtStartDate_AfterUpdate()
    Dim ws As Worksheet
    Set ws = Worksheets("FileCreator")
    ws.Range("C3").Value = txtStartDate.Value
    End Sub

    I tried putting the quotations in the Text and/or Value field (textbox properties) but when tabbed, they are highlighted which then requires mousing in between to type in data.

    Any ideas?
    I am sort of 'green' with VBA so any help is greatly appreciated.

    Robert

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Textbox data with quotations

    Have you tried changing this line
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    10-27-2009
    Location
    Georgia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Textbox data with quotations

    BINGO!
    Thanks a bunch... that works great!

+ Reply to Thread

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