Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run time error 1004
Hello, I am getting a run time error on the following line of my code (entire
code below). Basically I am trying to print files that are listed in the cells. Any help is appreciated. Thanks. *** Line erroring out*** Set bk = Workbooks.Open(cell.Name) ***Entire code*** Sub printfromqueue() Dim usrid As String Dim sh As Worksheet Dim rng As Range Dim bk As Workbook Dim cell As Range usrid = Environ("Username") Set sh = Workbooks(usrid & ".xls").Worksheets("Sheet1") Set rng = sh.Range(sh.Cells(1, 1), sh.Cells(1, 1).End(xlDown)) For Each cell In rng Set bk = Workbooks.Open(cell.Name) Finalize 'print macro bk.Close Savechanges:=False Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run time error '1004' | Excel Worksheet Functions | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
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 |