+ Reply to Thread
Results 1 to 13 of 13

editing a value within another excel (or non-excel) script.

  1. #1
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    editing a value within another excel (or non-excel) script.

    Hi There,

    I have set up some scripting within excel to automate some report production, getting data from a call solution called CMS. It works great so long as the data I require is from yesterday. It kinda falls down when I need data from 3 or 4 days ago. I have around 15 scripts set up (each getting a specific piece of data) that all contain the following entry to specify the date its requesting data for:

    Please Login or Register  to view this content.
    where -1 indicates the previous day.

    I also run the following code to run through each of the scripts sequentially (means I only have one click or task to schedule rather than dozens).

    Please Login or Register  to view this content.
    What I would like would be a "pop-up" box open that will allow me to enter a value that replaces the "-1" in each of the scripts it then opens and runs. I could enter -3 or a specific date in the fomant "DD/MM/YYYY".


    Is this possible?

    your help is greatly appreciated.
    Last edited by Kramxel; 07-04-2013 at 11:05 AM.

  2. #2
    Registered User
    Join Date
    08-31-2012
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: editing a value within another excel (or non-excel) script.

    Hi Kramxel,

    A couple of options.

    1. Select a specific cell (could be in this workbook or not) for your -1 or -3 entry and reference that range in your Date code. Whatever you type in this cell will be reflected in the date.

    2. I use a calendar form and have specified a specific cell to place the date that is picked from the calendar and then reference that range in my code. You can set the date format to be compatible with your scripts.

    T

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: editing a value within another excel (or non-excel) script.

    Can you actually read/write from these scripts?
    If posting code please use code tags, see here.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: editing a value within another excel (or non-excel) script.

    Maybe something like this...

    Please Login or Register  to view this content.
    Not sure if CDate(d) is an acceptable data type for the Rep. property
    Last edited by AlphaFrog; 06-26-2013 at 12:01 PM.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: editing a value within another excel (or non-excel) script.

    Is this in the script(s) you are running or in VBA?
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    08-31-2012
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: editing a value within another excel (or non-excel) script.

    Hi Norie - I use the calendar and a company list box to create a dynamic URL that I call from the macro by setting the range cell - E30.

    Excel formulas and formating get the URL in order then the macro copies and pastes special the URL in E30.

    Please Login or Register  to view this content.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: editing a value within another excel (or non-excel) script.

    tandwfund

    Are you sure you are in the right thread?

  8. #8
    Registered User
    Join Date
    08-31-2012
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: editing a value within another excel (or non-excel) script.

    Norie - thought you asked me a question in #3.

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: editing a value within another excel (or non-excel) script.

    That was a question for the OP, Kramxel.

  10. #10
    Registered User
    Join Date
    08-31-2012
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: editing a value within another excel (or non-excel) script.

    Norie - sorry for the confusion.....

  11. #11
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: editing a value within another excel (or non-excel) script.

    Quote Originally Posted by Norie View Post
    Is this in the script(s) you are running or in VBA?
    Please Login or Register  to view this content.
    this is in the script i'm running.

  12. #12
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644
    So can you read/write these scripts?

  13. #13
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    Re: editing a value within another excel (or non-excel) script.

    Apologies for the late reply - had a bout of sickness and just couldn't bring myself to sit in front of a computer, until a couple of days ago. A few days off and I managed to solve the problem when I got back. Having solved this problem I now have another that i'll post in a seperate thread.

    Thank you and apologies all rolled into one.
    Last edited by Kramxel; 07-04-2013 at 10:03 AM.

+ 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