PDA

View Full Version : Solved: What did I do wrong?



chungtinhlak
12-17-2008, 04:53 PM
My worksheet colum a contains the file path to various file.
i want to open the path that is on cell A3. what did I do wrong.



Sub test_open_file()
Dim testwkb As Workbook, primewkb As Workbook
Set primewkb = ThisWorkbook
set testwkb = application.Workbooks.Open(?primewkb.Worksheets("sheet1").range("A3").Value)

End Sub

mdmackillop
12-17-2008, 04:59 PM
Try without the question mark
(?primewkb

chungtinhlak
12-18-2008, 07:33 AM
thanks.