Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I change this to work for a closed workbook
Below is my code which works fine. However, it requires the "Employee
Database.xls" file to already be open. How could I change my code so that it is pulling this data from a closed "Employee Database.xls" file? Sub UpdateCodeBook() ' ' Employees Macro ' Macro recorded 9/28/2004 by Shawn D. Crabtree ' ' Keyboard Shortcut: Ctrl+Shift+E Sheets("Names").Columns("A:C").ClearContents Windows("Employee Database.xls").Activate Sheets("Library").Range("C:C,E:E,BE:BE").Copy ActiveWindow.ActivateNext Sheets("Names").Select Range("A1").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.DisplayAlerts = False Windows("Employee DataBase.xls").Close Application.DisplayAlerts = True Sheets("Names").Select Range("A1").Select End Sub -- Thanks Shawn |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change a work book number. I always getting workbook 1 | Excel Discussion (Misc queries) | |||
INDIRECT should be updated to work on closed workbooks. | Excel Worksheet Functions | |||
INDIRECT function do not work when other file is closed | Excel Discussion (Misc queries) | |||
Is there a work around to use the indirct function with a closed . | Excel Worksheet Functions | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions |