+ Reply to Thread
Results 1 to 4 of 4

Prompt Box Macro

  1. #1
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Prompt Box Macro

    Need Macro

    Prompt Box
    1) Prompt Box: Input Name of Bank
    2) Input number of times to repeat
    Restart until "done" is typed in the box

    Using data gathered from the macro
    3) Will input data recieved from stage one, and will repeat as many times as per stage 2 into column a.

    The macro needs to do this as many times as the prompt box stage is run, to fill out a list

    i.e.,

    1. "SCB"
    2. "3"
    1. "HSBC"
    2 "2"
    1. Done

    SCB
    SCB
    SCB
    HSBC
    HSBC
    thanks for the help.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Prompt Box Macro

    Hello hassankhan,

    The attached workbook uses a VBA UserForm to validate and input the data into column "A" starting at cell "A2". Here is the UserForm code.

    To run the macro press the keys Ctrl+e
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Prompt Box Macro

    Just one change I need.

    If I input
    MCB and repeat 1 time

    then
    hbl and repeat 5 times

    The mcb value is over written.

    I need it so that the value is not replaced

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Prompt Box Macro

    Hello hassankhan,

    I changed the macro in the attached workbook. The corrected code appears below.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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