Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time error 1004
In Cell B4 I have the string Array_Test.xls
When I double-Click on it (B4) Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Cancel = True Workbooks.Open Filename:="C:\Documents and Settings\Jim May\& Target.value" End Sub I obviously want the file Array_Test.xls to open; but "no go", Can someone assist? TIA, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time error 1004
Not tested, but try:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Cancel = True Workbooks.Open Filename:="C:\Documents and Settings\Jim May\" & Target.value End Sub The difference is that the end double quote is moved from after ".value" to after "May\". Your code makes "&Target.value" look like part of the path. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Time error 1004
Thank you, thank you;
It works perfectly. Jim "Mark Lincoln" wrote in message ups.com... Not tested, but try: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Cancel = True Workbooks.Open Filename:="C:\Documents and Settings\Jim May\" & Target.value End Sub The difference is that the end double quote is moved from after ".value" to after "May\". Your code makes "&Target.value" look like part of the path. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
run-time error '1004': Application-defined or object-deifined error | Excel Programming | |||
Run time error '1004': Generaol ODBC error | Excel Programming | |||
Run time error 1004 General ODCB Error | Excel Programming | |||
Application Run Time Error 1004 and Stack Error | Excel Programming |