Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default specifing an open workbook and reading its worksheets

Hi,

I open a workbook, hide it and want to read some values from it. I
want to read a data within a range on each work sheet.

It try the following and it says runtime error 9 subscript out of
range.

Dim myCurrentFolder As String
myCurrentFolder = ActiveWorkbook.Path
ChDir myCurrentFolder
'
NewFN = Application.GetOpenFilename(FileFilter:="Excel Files
(*.xls), *.xls", Title:="Please select a file", MultiSelect:=False)
'
'Open the folder as read only
Set myBook = Workbooks.Open(NewFN, , False)
With ActiveWindow
.Visible = False
End With
'
' I ACN GET TO ThIS FOR LOOP AND IT GIVES ME THAT ERROR
Dim wSht As Worksheet
For Each wSht In Workbooks(NewFN).Worksheets
Set myRng = wSht.Range("A1:A13")
myarray = myRng.Value
'SetDrawingCollection myarray, coll

Next wSht



thanks for the help,
jeremiah

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
REFRESH DATA in all Worksheets upon open of workbook sfleck Excel Discussion (Misc queries) 0 October 19th 07 12:08 AM
i can't see any worksheets when I open a workbook Mim Excel Discussion (Misc queries) 3 June 21st 06 09:05 PM
How do I open several worksheets from the same workbook on screen Innovman 2006 Excel Worksheet Functions 4 June 12th 06 04:57 PM
Open a template, copy 3 worksheets w ranges and save as workbook [email protected] Excel Programming 0 February 3rd 06 05:30 AM
Open text files as Worksheets in a workbook Binarian Excel Programming 0 November 5th 03 09:36 PM


All times are GMT +1. The time now is 01:57 PM.

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

About Us

"It's about Microsoft Excel"