Results 1 to 4 of 4

Workbooks.open method - vbs code

Threaded View

  1. #1
    Registered User
    Join Date
    12-13-2010
    Location
    melbourne australia
    MS-Off Ver
    Excel 2016
    Posts
    58

    Workbooks.open method - vbs code

    Hi Guys

    I have a bit of a problem. i have created an excel file that calculates leave for every calender week. i have installed the analysis toolpak add in and used the = weeknum() function. . it all works great when i open the file by clicking the .xls file.

    The problem i have is when i open the vbs file that i have created to open this .xls daily and update it. it opens the file but does not display the weeknumbers and saves the .xls file without weeknumbers.The file size varies when i open the file directly as opposed to opening it via vbs. i am definately missing something.

    thanks in advance

    the vbs code i use is
    xlApp = CreateObject("Excel.Application") 
    
    		xlApp.Visible = true
    
    		Set xlFile = xlApp.Workbooks.Open("R:\Production planning Control\LEAVE EXPORT\Leave Analysis.xls",,false,,,"1",true) 
    		
    		
    		xlApp.Run("Auto_Open") 
    
    		xlapp.DisplayAlerts = False
    
    		xlapp.ActiveWorkbook.close true
    
                    xlapp.quit
    Last edited by virencm; 01-05-2011 at 06:56 PM. Reason: Added Code Tags

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