D
Dan Thompson
I am trying to have my VBA code open a workbook from a website however I
don't want to have to keep refering to the whole URL name every time I need
to call it or work with it in my code so I just want to assign a short name
variable to represent it and currently my code is giving me a subscript out
of range error here is my code
Dim WPSR As Workbook
This is the code that is not working
Set WPSR =
Workbooks("http://tonto.eia.doe.gov/oog/ftparea/wogirs/xls/psw03.xls")
Workbooks.Open WPSR
This is my original code to open the file
'Workbooks.Open
Filename:="http://tonto.eia.doe.gov/oog/ftparea/wogirs/xls/psw03.xls"
'Sheets("Data 1").Select
'ActiveWindow.SmallScroll Down:=3
don't want to have to keep refering to the whole URL name every time I need
to call it or work with it in my code so I just want to assign a short name
variable to represent it and currently my code is giving me a subscript out
of range error here is my code
Dim WPSR As Workbook
This is the code that is not working
Set WPSR =
Workbooks("http://tonto.eia.doe.gov/oog/ftparea/wogirs/xls/psw03.xls")
Workbooks.Open WPSR
This is my original code to open the file
'Workbooks.Open
Filename:="http://tonto.eia.doe.gov/oog/ftparea/wogirs/xls/psw03.xls"
'Sheets("Data 1").Select
'ActiveWindow.SmallScroll Down:=3