Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex conditional summing - array COUNT works, array SUM gives#VALUE fatcatfan Excel Worksheet Functions 4 November 18th 09 06:41 PM
Prevent cell/array references from changing when altering/moving thecell/array nme Excel Discussion (Misc queries) 1 September 19th 08 01:53 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 6 November 9th 05 05:54 AM
Array problem: Key words-Variant Array, single-element, type mismatch error davidm Excel Programming 1 November 8th 05 04:21 AM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"