Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've started this code but it does not open the file. Can you help? BkNme is
loaded in a different routine. Sub Wrkbk_Open(BkNme) Dim WorkBk As Workbook Dim WrkBk As String Dim BKPath As String BKPath = "C:\Documents and Settings\Richard L. Harig\My Documents\Excell\Financials\" WrkBk = BKPath & BkNme On Error Resume Next Set WorkBk = Workbooks(WrkBk) If WorkBk Is Nothing Then On Error GoTo Err0pn Workbooks.Open Filename:=WorkBk, UpdateLinks:=3 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you're using Workbooks(xxxx), you don't specify the folder.
WrkBk = BKPath & BkNme On Error Resume Next Set WorkBk = Workbooks(bknme) .... You still open the file using the path, though. Rick wrote: I've started this code but it does not open the file. Can you help? BkNme is loaded in a different routine. Sub Wrkbk_Open(BkNme) Dim WorkBk As Workbook Dim WrkBk As String Dim BKPath As String BKPath = "C:\Documents and Settings\Richard L. Harig\My Documents\Excell\Financials\" WrkBk = BKPath & BkNme On Error Resume Next Set WorkBk = Workbooks(WrkBk) If WorkBk Is Nothing Then On Error GoTo Err0pn Workbooks.Open Filename:=WorkBk, UpdateLinks:=3 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merge rows from 2 XLS files using a common key field. | Excel Discussion (Misc queries) | |||
can't open excel files from common folder | Excel Discussion (Misc queries) | |||
Open a mail merge from excel: common problem | Excel Programming | |||
Open a mail merge from excel: common problem | Excel Programming | |||
Hyperlink to open a common dialog on a msgbox | Excel Programming |