+ Reply to Thread
Results 1 to 5 of 5

Accessing contents of textbox on worksheet

  1. #1
    Registered User
    Join Date
    02-14-2010
    Location
    Preston England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Accessing contents of textbox on worksheet

    I have a worksheet with lots of textboxes. They are part of a logic diagram. Can I access the contents of one of the text boxes using a macro ?

    I tried Dim sj as string
    sj=textbox1.text

    but I guess this must be a bit naive.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Accessing contents of textbox on worksheet

    Does your code work?

    P.s Please use code tags

  3. #3
    Registered User
    Join Date
    02-14-2010
    Location
    Preston England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Accessing contents of textbox on worksheet

    No, it doesn't work, it gives Run-time error 424. I wrote the following

    Please Login or Register  to view this content.
    Last edited by dcwm; 05-12-2015 at 03:34 PM.

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Accessing contents of textbox on worksheet

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  5. #5
    Registered User
    Join Date
    02-14-2010
    Location
    Preston England
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Accessing contents of textbox on worksheet

    Sorry Guys. Long time since I used this forum.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 01-29-2014, 05:53 AM
  2. Accessing and using page contents from browser (IE) cache
    By FSalgueiro in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-20-2013, 12:27 PM
  3. VBA - Macro Code to copy textbox text to another worksheet textbox
    By nitram lowm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2013, 08:39 AM
  4. Macro to copy textbox data to a duplicate textbox in another worksheet
    By nitram lowm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-02-2013, 06:10 AM
  5. Userform to search textbox value to place other textbox values in worksheet
    By mattyh555 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2012, 11:38 AM

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