Results 1 to 5 of 5

Logic Help

Threaded View

  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.

    Public Sub create_batch_file()
         
        Const MY_FILENAME = "C:\temp\test.bat"
         
        Dim FileNumber As Integer
        Dim retVal As Variant
         
        FileNumber = FreeFile
         
         'creat batch file
        Open MY_FILENAME For Output As #FileNumber
        'create file name using reference number
        Print #FileNumber, "run_daily_load.bat > Log_'Load Stats3'!C1"; .Log ' I am getting the error here
        Print #FileNumber, "exit"
        Close #FileNumber
         
    End Sub
    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

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