+ Reply to Thread
Results 1 to 8 of 8

Determine location of text boxes on sheet

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Determine location of text boxes on sheet

    This is a new question regarding a solved solution

    The following code determines the location and size of text boxes on the active sheet, it then places the corresponding information onto another sheet. The solution worked great on my test file but when I placed it into the working copy it failed. I got a run time error 9 "subsrcript out of range"

    At first I thought that perhaps one of my text boxes on my working copy was causing a problem, so I copied each text box one by one to my test file and ran the code below and everything worked fine, so I'm pretty sure their is nothing strange going on with the text boxes

    The code is placed inside the sheet module

    Any help would be greatly appreciated

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Determine location of text boxes on sheet

    Does your copy have sheet called "Sheet5"?

  3. #3
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Determine location of text boxes on sheet

    Yes sheet5 is present

  4. #4
    Forum Contributor
    Join Date
    04-24-2007
    Location
    NYC
    MS-Off Ver
    2k3/2k7/2010
    Posts
    270

    Re: Determine location of text boxes on sheet

    Do you have more than 1 shape on that sheet?

  5. #5
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Determine location of text boxes on sheet

    Yes I have multiple text boxes

  6. #6
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Determine location of text boxes on sheet

    I used the debug step into and followed the operation of the code.

    I have 11 text boxes on my sheet, the code when stepping through does everything correctly then on the 11th loop when
    Please Login or Register  to view this content.
    = 11, the next line
    Please Login or Register  to view this content.
    is where it seems to fail

    Any help would be appreciated

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Determine location of text boxes on sheet

    Hi jprlimey.
    try it
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    205

    Re: Determine location of text boxes on sheet

    nilem,

    your solution worked great, so what was the cause of the problem

    Thanks

+ 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. [SOLVED] Detmine the location and size of all text boxes on sheet
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-13-2014, 11:42 AM
  2. Replies: 3
    Last Post: 01-17-2014, 11:51 PM
  3. Determine List of People at Each Location on Each Day
    By bwalshnl in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-14-2013, 01:36 PM
  4. Function to determine cell location
    By jcg61 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-15-2010, 03:31 AM
  5. Replies: 2
    Last Post: 02-19-2010, 03:55 PM

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