Hello
this is my first macro ever, and i hope you cna help me to start a good relation with this wonderful tool.
It used to work very well and then - it simply doesn't work even if i rewrite it in another file. i Get this message after trying to open the file - Run-Time Error '1004' - Microsoft Excell Cannot Access the file
i checked the file and downloaded it manualy and it is working fine
the macro stops when it begins to open the file
Sub Heliumcheck()
'
' Heliumcheck Macro
'
Dim wbMe As Workbook
Dim wsNew As Worksheet
Dim w As Integer
Dim wbURL As Workbook
Dim url As String
Set wbMe = ThisWorkbook
url = "http://specificfileinmycompany.xls"
Set wbURL = Workbooks.Open(url)
'## Add code to copy this data to your workbook and/or manipulate the data...'
w = wbMe.Sheets.Count
'## Copy & Paste this data in to our new worksheet:'
'wbURL.Sheets(2).Cells.Copy Destination:=wsNew.Range("A1")'
wbURL.Sheets(2).Cells.Range("A:F").Copy Destination:=wbMe.Sheets(1).Cells.Range("A:F")
'## Close the downloaded version which we no longer need:'
wbURL.Close
End Sub
appreciate your help very much
this is my first macro ever, and i hope you cna help me to start a good relation with this wonderful tool.
It used to work very well and then - it simply doesn't work even if i rewrite it in another file. i Get this message after trying to open the file - Run-Time Error '1004' - Microsoft Excell Cannot Access the file
i checked the file and downloaded it manualy and it is working fine
the macro stops when it begins to open the file
Sub Heliumcheck()
'
' Heliumcheck Macro
'
Dim wbMe As Workbook
Dim wsNew As Worksheet
Dim w As Integer
Dim wbURL As Workbook
Dim url As String
Set wbMe = ThisWorkbook
url = "http://specificfileinmycompany.xls"
Set wbURL = Workbooks.Open(url)
'## Add code to copy this data to your workbook and/or manipulate the data...'
w = wbMe.Sheets.Count
'## Copy & Paste this data in to our new worksheet:'
'wbURL.Sheets(2).Cells.Copy Destination:=wsNew.Range("A1")'
wbURL.Sheets(2).Cells.Range("A:F").Copy Destination:=wbMe.Sheets(1).Cells.Range("A:F")
'## Close the downloaded version which we no longer need:'
wbURL.Close
End Sub
appreciate your help very much