+ Reply to Thread
Results 1 to 5 of 5

Create borders to enter the number in InputBox

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Create borders to enter the number in InputBox

    Hi.


    how do I use an inputbox as follows.
    opening the inputbox, if I type the number 12 will then be created borders "A1" to "H12".

    If I enter in the inputbox number 29 will then be created borders "A1" to "H29".

    but inside the inputbox to accept only numbers, not text!

    Thank you!
    Last edited by marreco; 05-12-2012 at 10:41 AM.
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Create borders to enter the number in InputBox

    Hi Marreco,

    If you record a macro of adding borders to a range you will see the basic structure to do so. To prompt the user for a number-only Inputbox use:
    Please Login or Register  to view this content.
    You'll then be able to adjust the code to add borders, e.g.
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Create borders to enter the number in InputBox

    Hi. Paul

    how do I create edges on all sides of the cell?

    I try but it is giving error
    Please Login or Register  to view this content.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Create borders to enter the number in InputBox

    Remove these two lines from my code and you will have borders around every cell in the range, not just around the range itself:
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Create borders to enter the number in InputBox

    it's Great!!!

    very good!

    thank you very much

+ 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