Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reading data arrays from multiple data files in excel | Excel Discussion (Misc queries) | |||
Creating a text string by reading content in multiple cells | Excel Worksheet Functions | |||
Reading Multiple Pages Listing Top three Results. | Excel Worksheet Functions | |||
Please Help for a macro reading files not in sequence | Excel Discussion (Misc queries) | |||
Reading dbf files | Excel Discussion (Misc queries) |