Results 1 to 1 of 1

VBA UDF to populate textbox in UserForm

Threaded View

  1. #1
    Registered User
    Join Date
    04-28-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2003, 07 & 10, 16
    Posts
    26

    VBA UDF to populate textbox in UserForm

    Hi -

    This seems like it should be easy to do, but for the life of me I can't figure it out. What I'm trying to do:

    When a user opens up the file, a User Form will display using the Worksheet_Open event. (this is working fine).
    I've got a Textbox on the UF that I would like to populate with the value from the following function.

    Function UDomain() as string
    UDomain - Environ("USRDNSDOMAIN")
    End Function
    I can complete this by first sending the result to a cell in the worksheet and then bringing the value over to the textbox, but I'm looking for a way to bypass putting the info on the worksheet.

    anybody know if this is possible?

    thx.
    Last edited by Cutter; 10-16-2012 at 01:35 PM. Reason: Added code tags

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