+ Reply to Thread
Results 1 to 5 of 5

Logic Help

  1. #1
    Registered User
    Join Date
    09-30-2011
    Location
    paris
    MS-Off Ver
    Excel 2003
    Posts
    16

    Logic Help

    HI,

    Please help me with a logic, to achieve the below.

    I have a xls with multiple sheets, In each sheet I am calling macros for loading the data. In Load Stats1 tab in C2 cell we have a reference number, this reference number has to be populated in each .bat file I am generating.

    Below is the script I am using to run on Loadstats1 and Loadstats3 worksheets, but the value of Loadstats1.c1 vell value is not coming properly.

    Please Login or Register  to view this content.
    Please help me how can I get the value and use it in all worksheets for populating it in my script.

    Regards,
    Shruthi
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Logic Help

    Hi Shruthi:

    Your saved file is .xlsx instead of .xlsm so none of the code got saved.

    Anyway,

    Focusing just on the line where you have issue:

    change to:
    Please Login or Register  to view this content.
    Regards,
    Vandan

  3. #3
    Registered User
    Join Date
    09-30-2011
    Location
    paris
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Logic Help

    Hi Vandan,

    Thanks for the help, I am able to get the cell value in my code.But when I execute the macro, first time the file is not generated, and when i execute it second time , it says file already in use and then writes the data to the file, I tried multiple times, the data is generating only in the second click. can you please check and tell me if my below code is correct.

    Please Login or Register  to view this content.
    Regards,
    Shruthi

  4. #4
    Valued Forum Contributor
    Join Date
    05-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    354

    Re: Logic Help

    When I run the code, it creates the .bat file for me.

    Does c:\temp directory exist on your PC? if not that is the problem.

    That said, the content of the .bat file do not look right to me. please ensure it is as you intended. If not you will have to modify the print #.

    If you still have a problem, let me know and we can bump this thread.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,317

    Re: Logic Help

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    HTH
    Regards, Jeff

+ 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