Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you gonna open the file to get the value?
dim wkbk as workbook dim myFileName as variant dim MyValue as variant myfilename = application.getopenfilename("Excel files, *.xls") if myfilename = false then exit sub end if set wkbk = workbooks.open(filename:=myfilename) myvalue = wkbk.worksheets("sheet1").range("a7").value wkbk.close savechanges:=false ======== But John Walkenbach has a routine that can get values from a closed workbook: http://j-walk.com/ss/excel/eee/eee009.txt Look for either: GetDataFromClosedFile or GetValue. Steve wrote: Hi I think I should have asked this with my earlier question. I now have the file name using getopenfilename. However, I now want to start getting various bit of information from various sheets in that file. I have tried the following just to get myself started but with no success. Name = myFileName.worrksheets("sheet1").Range("A7").Value where my filename is the variable used for the return fileanme. Please help Many thanks -- Steve R -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Import file information | Excel Discussion (Misc queries) | |||
Displaying row information in another file | Excel Worksheet Functions | |||
Using information in one excel file in another | Excel Worksheet Functions | |||
File Information?? | Excel Programming | |||
file information | Excel Programming |