P
peterlaramore
I know this isn't the best way to go about this, but I a learning
here. . .
I am using this to update stock prices from a Google Finance query. I
have a list of about 200 stocks, and when I run the below query for
200 cells I get a "Compile Error: Procedure too large". Can anybody
show me the light simplifying this? Thanks much.
Range("B2").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Copy
Sheets("Sheet1").Select
Range("M2").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B3").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Copy
Sheets("Sheet1").Select
Range("M3").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
And so on. . .
here. . .
I am using this to update stock prices from a Google Finance query. I
have a list of about 200 stocks, and when I run the below query for
200 cells I get a "Compile Error: Procedure too large". Can anybody
show me the light simplifying this? Thanks much.
Range("B2").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Copy
Sheets("Sheet1").Select
Range("M2").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B3").Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A2").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.Copy
Sheets("Sheet1").Select
Range("M3").Select
ActiveSheet.Paste
ActiveSheet.Paste
Application.CutCopyMode = False
And so on. . .