+ Reply to Thread
Results 1 to 5 of 5

Prompt to modify code

  1. #1
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Prompt to modify code

    Hi all I was wondering if anyone knew how to add in a text box prompt that will modify code?

    Please Login or Register  to view this content.
    Last edited by randell.graybill; 04-30-2009 at 01:59 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Prompt to modify code

    Modify how? Putting in a msgbox and based on the answer using different portions of code is doable...
    Please Login or Register  to view this content.
    Or, you can use an INPUTBOX to change the way macros are applied altogether. An input box value can be fed into macros as sheetname changes, date range adjustments, name filters, range filters... pretty much anything you can imagine.

    What do you have in mind?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Re: Prompt to modify code

    you see in the code where it says "Picking Diffences 04-01-2009 Daily.xls" I want the prompt to ask the user to input the date they are checking and the code should use the date they inputed into the box for each time "Picking Diffences 04-01-2009 Daily.xls" appears. so for example if I put in "Picking
    Diffences 04-21-2009 Daily.xls" in the text box the code should read "Picking Diffences 04-21-2009 Daily.xls" each time "Picking Differences is referenced.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Prompt to modify code

    This code results in a string called "TheString" which you can insert throughout the rest of your code instead of the file name. It asks for a date, evaluates it and inserts it into your filename. I left a message box popup so you would see the name of the result:
    Please Login or Register  to view this content.
    For example:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-03-2009
    Location
    USA, California
    MS-Off Ver
    Excel 2007
    Posts
    385

    Re: Prompt to modify code

    Thanks a bunch works like a charm.

+ 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