+ Reply to Thread
Results 1 to 4 of 4

How do avoid Select when coding TextBoxes

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    How do avoid Select when coding TextBoxes

    The following code fragment works:-
    Please Login or Register  to view this content.
    When I change it to :-
    Please Login or Register  to view this content.
    I get the error message "Object does not support this property or method", at line 20
    Can someone please explain where I have gone wrong?
    John

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How do avoid Select when coding TextBoxes

    Try this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: How do avoid Select when coding TextBoxes

    Using your helpful suggestion I re coded the full procedure as follows:-
    Please Login or Register  to view this content.
    The first line is a direct copy of yours and it works, at least I can click through it without an error. However TextBox 2 does not get filled with a.
    The next section which I had hoped would just be an extension of your code is stopped by an error message telling me that "the index into the specified collection is out of bounds.
    The third section as expected gives me the same error.
    I am very confused. I think that the collection is Shapes and the index is the array name TBoxName = "TextBox 2" and that definitely is the name that shows when I select the TextBox on the sheet "DASH". I hope you can spare some more time to help me!
    John

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How do avoid Select when coding TextBoxes

    Not tested.

    Please Login or Register  to view this content.

+ 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. VBA Coding to populate rows of textboxes with Advanced filter data
    By Rachaelhoover in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2018, 06:34 PM
  2. [SOLVED] Select all text in textboxes when i click textboxes in simple way
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2017, 03:27 AM
  3. [SOLVED] Vba assistance with coding for ListBox population from textBoxes
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2016, 06:26 AM
  4. [SOLVED] How to avoid having to select same range twice?
    By Vonvorx in forum Excel General
    Replies: 4
    Last Post: 04-30-2016, 07:50 AM
  5. [SOLVED] How do I avoid MultiPage1 and UserForm coding redundancy?
    By EMyk08 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2014, 07:44 PM
  6. Coding userform textboxes
    By Rgt520 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-01-2013, 04:54 PM
  7. User-changeable paths into Excel - avoid hard coding
    By gearoi in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-31-2005, 11:05 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