Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to open a file from an e-room and then work from it.
I have the working hyperlink below and I want to set it as the formfile. ActiveWorkbook.FollowHyperlink(Address:="e-room file address.xls") That code works to open the file, but it just opens it and then carries on with the code (and fails because it needs to open the above sheet) because it isnt defined as a sheet I want to work from. Putting this infront doesnt seem to work: Set theformfile = If i use: Set theformfile = ActiveWorkbook.FollowHyperlink(Address:=....... then it returns an error which says "expected function or variable" So Im a bit stuck. Any help would be appreciated. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd drop the hyperlink and just open the file:
dim eRoomWkbk as workbook set eroomwkbk _ = workbooks.open(filename:="C:\somefolder\e-room file address.xls") Then I could do what I wanted to that workbook. eRoomWkbk.worksheets(1).range("a1").value = "hi there!" eroomwkbk.close savechanges:=true retepallen wrote: I want to open a file from an e-room and then work from it. I have the working hyperlink below and I want to set it as the formfile. ActiveWorkbook.FollowHyperlink(Address:="e-room file address.xls") That code works to open the file, but it just opens it and then carries on with the code (and fails because it needs to open the above sheet) because it isnt defined as a sheet I want to work from. Putting this infront doesnt seem to work: Set theformfile = If i use: Set theformfile = ActiveWorkbook.FollowHyperlink(Address:=....... then it returns an error which says "expected function or variable" So Im a bit stuck. Any help would be appreciated. Thanks. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there an easy way to open a text file and modify only a part of it? | Excel Programming | |||
Hyperlink won't open any other XLS file | Excel Discussion (Misc queries) | |||
Loop through, open, and modify all workbooks in file | Excel Programming | |||
file open via IE hyperlink causes already open files to shrink and tile | Setting up and Configuration of Excel | |||
Modify date of a file via hyperlink? | Excel Programming |