Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default HELP = VBA Code To Import Worksheets Into A WorkBook

it's this piece of code that I do not understand:

Worksheets.Copy after:=Sheets(Sheets.Count)
bk.Close savechanges:=False

at the top of my code I have set the following, this sets bk to be the
workbook I have opened:

Folder = "F:\My Documents\Fantasy Football\XLS_Emails\"
FName = Dir(Folder & "*.xls")
Do While FName < ""
With ThisWorkbook
Set bk = Workbooks.Open(Filename:=Folder & FName)
For y = 1 To bk.Sheets.Count

< more code


so how does the copy work, what is copying what to where - I want to
copy the sheet from the open workbook to a new sheet in my master
workbook

Worksheets.Copy after:=Sheets(Sheets.Count)
bk.Close savechanges:=False


sorry for being dumb..
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import worksheets from another workbook? bjwheeler Excel Worksheet Functions 1 April 13th 09 05:24 PM
Rename worksheets of workbook - Error code [email protected] Excel Programming 1 July 21st 07 12:31 AM
macro to execute code on all worksheets in workbook Gretta Excel Programming 5 April 5th 07 03:44 PM
Import two worksheets into workbook dan Excel Programming 1 July 24th 06 03:51 PM
Run code for multiple worksheets in a workbook & Column Formatting Shaun[_3_] Excel Programming 1 January 7th 04 08:35 PM


All times are GMT +1. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"