Results 1 to 2 of 2

Running macros on multiple windows

Threaded View

noxid82 Running macros on multiple... 01-26-2012, 07:59 AM
royUK Re: Running macros on... 01-26-2012, 09:48 AM
  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    Brighton, UK
    MS-Off Ver
    Excel 2007
    Posts
    4

    Running macros on multiple windows

    I'm running a macro that has worked on previous computers (windows xp and office 2000), I'm now using windows 7 and office 2007.

    The macro is designed to cycle through a number of windows, the amount defined using an inputbox function, taking data from each file and putting it into a summary file. Currently, the macro is only working for the first window and wont cycle through. The program reads as follows:


    Sheetall = InputBox("Number of worksheets to be analysed?")
          Sheettot= Val(Sheetall)
    
          For sheetnow= 1 To Sheettot
                  Windows(sheetnow+ 1).Activate
    
                      (here is the main body of the macro, which is working fine)
    
          Next sheetnow

    Can anyone please help??
    Last edited by noxid82; 01-26-2012 at 11:39 AM.

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