Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with VB Excel statement
Hi, can someone please give me the syntax for Excel VB statement to
open a worksheet, which is named in "INDEX(dir, k)". In my XLM program the statement is simply "=OPEN(dir,k)", but I can't seem to figure out how to write it in VB. Many thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with VB Excel statement
workbooks.Open FileName:=Dir, UpdateLinks:=k
This assume the variable Dir holds a fully qualified path with filename or if the file is in the default directory/drive, then just the filename. However, there is a VBA function named Dir, so you might want to use a different variable name for this variable. -- Regards, Tom Ogilvy " wrote: Hi, can someone please give me the syntax for Excel VB statement to open a worksheet, which is named in "INDEX(dir, k)". In my XLM program the statement is simply "=OPEN(dir,k)", but I can't seem to figure out how to write it in VB. Many thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help with VB Excel statement
On Feb 14, 2:10 pm, Tom Ogilvy
wrote: workbooks.Open FileName:=Dir, UpdateLinks:=k This assume the variable Dir holds a fully qualified path with filename or if the file is in the default directory/drive, then just the filename. However, there is a VBA function named Dir, so you might want to use a different variable name for this variable. -- Regards, Tom Ogilvy Thanks Tom, I appreciate it. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
Excel VBA OR statement | Excel Programming | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |