Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to use an array ?
Hello group, Below is the code that retrieves some information off a web server. As you know better following code will place all information in cell A7 and following cells. Now, since I need to create a progress bar I think that the best way would be inserting all coming informatin into an array first. Then afterwards, I will read the information from the array and will populate the sheet then I can use a progress bar based on each row being filled. 1) My question is how can I have this code to put information into array instead of sheet first? 2) Currently this code is dependent to "sheet1". so if I make it as Add-In it would expect to have sheet1 only. How can I modify my code in a way that let it use any sheet? either sheet1 or sheet2 or ...? 3) How can I create a new sheet when there is nothing open initially? Thank you so much. AK Dim strRq1 As String Dim strRq2 As String Dim strRq3 As String On Error Resume Next 'Clean up the page ActiveWindow.ActiveSheet.UsedRange.Clear 'Populate the sheet from A7 cell on With ActiveSheet.QueryTables.Add(Connection:= _ "URL;" & strRq1 & strRq2 & strRq3, _ Destination:=Range("A7")) .BackgroundQuery = True .TablesOnlyFromHTML = True .Refresh BackgroundQuery:=False .SaveData = True End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Complex conditional summing - array COUNT works, array SUM gives#VALUE | Excel Worksheet Functions | |||
Prevent cell/array references from changing when altering/moving thecell/array | Excel Discussion (Misc queries) | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming | |||
Array problem: Key words-Variant Array, single-element, type mismatch error | Excel Programming |