vba and multiple excel

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

TrustPilot

starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA and Multiple Excel Files

VBA and Multiple Excel Files

resolvedResolved · Low Priority · Version 2003

Matthew has attended:
Excel VBA Intro Intermediate course

VBA and Multiple Excel Files

Is it possible to have the VBA code go into multiple excel workbooks that are not necessarily open and pull out values / data?

RE: VBA and Multiple Excel Files

Hi Matthew

If you want to open a closed workbook from another workbook to then copy values from it you write the following code:

Application.Workbooks.Open "C:\My Documents\Accounts\2008 Accounts.xls"

The full path of the Workbook's address can be found using Windows Explorer and copied in. The path is a string.

The Workbooks.Open method also allows you to set other Worksheet values like passwords

Hope this helps

Carlos

Thu 16 Apr 2009: Automatically marked as resolved.


 

Excel tip:

Move data worksheet to worksheet

To move data from one worksheet to another, highlight the data.

Select and hold down the ALT key and position the mouse on the border of the selection until the mouse pointer displays four-headed arrows.

Drag the selection down to the destination worksheet tab.

When the arrow touches the tab, Excel switches to the desired worksheet. Now drag the selection to the correct position. Let go of the mouse and then the ALT key.

To copy data from one worksheet to another, select and hold down the CTRL+ALT keystroke combination and perform the steps above.

View all Excel hints and tips


Server loaded in 0.08 secs.