Consulting

Results 1 to 3 of 3

Thread: Excel User Form Inquiry

  1. #1
    VBAX Regular
    Joined
    Aug 2006
    Location
    New York City
    Posts
    23
    Location

    Excel User Form Inquiry

    Hello,

    I want the text typed into a form to populate a specific cell. In the code window, I thought to type something like...

    [VBA]Private Sub TextBox1()
    Workbook("Account holder!C9).value
    End Sub[/VBA]


    I'm not used to forms and as such don't know how to translate data to cells.

    Thanks.....

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by bassman71
    Hello,

    I want the text typed into a form to populate a specific cell. In the code window, I thought to type something like...

    Private Sub TextBox1()
    Workbook("Account holder!C9).value
    End Sub


    I'm not used to forms and as such don't know how to translate data to cells.

    Thanks.....
    [vba]

    Private Sub TextBox1_Change()
    Worksheets("Account holder").Range("C9").value = Me.TextBox1.Value
    End Sub
    [/vba]

  3. #3
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Also, have you checked, at this point in your code, if that workbook is indeed open? You may want to think about checking with a simple function ...

    [vba]Function WbOpen(wbName as string) as boolean
    on error resume next
    wbopen = len(workbooks(wbname).name)
    End Function[/vba]

    HTH

Posting Permissions

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