LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Reading fields from multiple new files

Hi

We create a number of new files from a template a day, and collect some data
from these new files for statistical purposes. What name / handle can I use
to have a
dynamic name for the workbook that is open in addistion to the stats workbook.

Heres what I got so far:

Sub openFile()

' OPEN FILE
openThisFile = Application.GetOpenFilename(FileFilter:="Excel Files (*.xls,
*xlsx), *.xls, *xlsx", Title:="Please select a file")
If openThisFile = False Then
' They pressed Cancel
MsgBox "Stopping because you did not select a file"
Exit Sub
Else
Workbooks.Open filename:=openThisFile
End If
' END OPEN FILE


Call selectNextRow
Call doRead

End Sub

**********

Sub selectNextRow()

'Activate the STATS sheet
Windows("Statistics.xls").Activate
Worksheets(4).Select

'Select the next available row
Application.ScreenUpdating = False
NextRow = Range("C65536").End(xlUp).Row + 1
Cells(NextRow, 1).Select
Application.ScreenUpdating = True

End Sub

************

Sub doRead()

ActiveCell.FormulaR1C1 = "='somethinghere'!R5C4"
Cells(Selection.Row, Columns.Count).End(xlToLeft).Offset(, 1).Select


End Sub

************

so i need a litlle something weher it says 'somethinghere' in doRead().
Can i get it from filename or openThisFile?

probably a newby question, but i am one so that's alright, right?

/marko


 
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
Reading data arrays from multiple data files in excel Hankjam[_2_] Excel Discussion (Misc queries) 0 February 7th 08 08:29 PM
Creating a text string by reading content in multiple cells smaruzzi Excel Worksheet Functions 3 February 8th 07 05:12 PM
Reading Multiple Pages Listing Top three Results. Killer Excel Worksheet Functions 0 November 18th 06 02:36 AM
Please Help for a macro reading files not in sequence Francesco Excel Discussion (Misc queries) 8 April 15th 06 06:13 PM
Reading dbf files Luis Verme Excel Discussion (Misc queries) 6 July 1st 05 01:32 AM


All times are GMT +1. The time now is 02:22 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"