+ Reply to Thread
Results 1 to 6 of 6

Centering text in textbox.

  1. #1
    Forum Contributor
    Join Date
    05-19-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    107

    Question Centering text in textbox.

    Mornign all,
    I currently have a macro that displays a textbox asking the user to please wait while the files are updated. It then runs a second macro to compile some reports. Then when everything is updated it deletes the text box. The problem I am having is getting the text in the text box to center horizontly and vertically so it appears in the middle of the box.

    The code is:

    Please Login or Register  to view this content.
    Last edited by CJPHX; 05-31-2010 at 12:48 PM.

  2. #2
    Forum Guru mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,220

    Re: Centering text in textbox.

    There is usually no need to Select. I've removed a few Selects. The text alignment code is in red.
    Please Login or Register  to view this content.
    Last edited by mikerickson; 05-31-2010 at 12:43 PM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Contributor
    Join Date
    05-19-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Centering text in textbox.

    Mornign Mike,
    I tried the text alignment and I got a "Compile Error: Invalid or unqualified reference". The selects I had in there at the end was so that the text box would delete itself after the files were done updating.

  4. #4
    Forum Contributor
    Join Date
    05-19-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Centering text in textbox.

    Sorry Mike. I pasted in the whole code you had set up instead of the alignment part and it is working wonderfully. thank you.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,202

    Re: Centering text in textbox.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    05-19-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2003
    Posts
    107

    Re: Centering text in textbox.

    royUK. Thank you, but I am showing that I already marked it as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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