gilmoreisu
New Member
- Joined
- Jul 1, 2008
- Messages
- 4
Preface: I have no training in VBA but can read through simple code and understand it.
Using the recorder I attempted to have the macro click a link which leads to a spreadsheet on the intranet. Copy the data. Paste the data into certain cells.
The program isn't errering out, it just stops after it clicks the link to open the page. I've tried making the macro wait before copying but it seems like the code just dies after opening the spreadsheet.
I've attempted to remake the code without using copy/paste before I realized it dies before the copy is attempted.
Thanks for any help you all can provide. This seems like it should be simple, but nothing is working for me.
Using the recorder I attempted to have the macro click a link which leads to a spreadsheet on the intranet. Copy the data. Paste the data into certain cells.
The program isn't errering out, it just stops after it clicks the link to open the page. I've tried making the macro wait before copying but it seems like the code just dies after opening the spreadsheet.
I've attempted to remake the code without using copy/paste before I realized it dies before the copy is attempted.
Code:
Sheets("Data2").Select [COLOR=red]'sheet where the data will be pasted[/COLOR]
Range("C1:I1").Select [COLOR=red]'This is the cell where the hyperlink is
[/COLOR] Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Workbooks.Open Filename:= _
"[URL="http://sv2epwsp1001.ent.wfb.bank.corp:8080/dfm/report/view/volumes-capacity?lines=0&output-format=xls"]<link>[/URL]"
ActiveWindow.Visible = False
Windows("volumes-capacity.xls").Visible = True
Sheets("volumes-capacity").Activate
Range("A1:G5000").Select
Selection.Copy
Windows("Filer Capacity Report.xls").Activate
Range("C3").Select
ActiveSheet.Paste
Windows("volumes-capacity.xls").Activate
Application.CutCopyMode = False
ActiveWindow.Close
Thanks for any help you all can provide. This seems like it should be simple, but nothing is working for me.