Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default web query peculiar problem

I have at least to me a peculiar prolem

my data base is

col A col B
company name yahoocode
ABHISHEK IND ABHP.NS
ADOR WELDING ADOR.NS
AJANTA PHARMA AJPH.NS
AKSH OPTIFIBRE AKSO.NS
ALEMBIC ALMC.NS
ALFA LAVAL I ALFA.NS
ALLAHABAD BK ALBK.NS
ALOK INDUS ALOK.NS
AMTEK AUTO AMTK.NS

my sub is
Dim cell As Range
Dim mystocks As Range
Dim stockone As Range
Dim stocklast As Range

Public Sub download_data()
Application.DisplayAlerts = False
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://in.finance.yahoo.com/d/quotes.csv?s=" & ActiveCell &
"&m=b&f=sl1d1t1c1ohgv&e=.csv" _
, Destination:=ActiveCell.Offset(0, 1))
.Name = "quotes.csv?s=" & ActiveCell & "&m=b&f=sl1d1t1c1ohgv&e="
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
'ActiveCell.Offset(0, 1).Select
ActiveCell.Offset(0, 1).Select
Selection.TextToColumns Destination:=ActiveCell, DataType:=xlDelimited,
_
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=True, OtherChar
_
:=",", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1),
Array(4, 1), Array(5, _
1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1))

Range("a1").Select
Application.DisplayAlerts = True
End Sub
first my active cell is the first cell after the column head (yahoo code) in
column B and if run the sub I get thedata on col c
when I make the next cell in column B as activecell and run thesub the
corresponding data comes in col C in that row.
etc etc
this works in my computer windows 98SE excel2000

if run the same sub in my borher's computer XP excel 2000 when I activate
the second celll under yahoo code
the data already received in the previous row shifts one cell to the right
when the thrid cell is activated, the first data now in col D shifts one to
right and the second data in col C shifts to D
for each new row cell selected the shift of all the previous row data by one
cell to the right. why?????
my borther has both win98 and xp. when I open the system in win 98 and run
the macro it works perfectly
wherer do I do the mistake.
aplogise for long message.


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
Peculiar External Link Problem Ananth Excel Discussion (Misc queries) 1 April 3rd 09 07:53 AM
Peculiar Date problem Shweta Srivastava77 New Users to Excel 4 May 14th 07 01:32 PM
A peculiar PDF from Excel problem Daniel Bonallack Excel Discussion (Misc queries) 2 March 17th 05 11:23 PM
A peculiar problem Charles Williams Excel Programming 1 July 11th 03 03:52 AM
A peculiar problem Patrick Molloy[_3_] Excel Programming 1 July 10th 03 12:03 PM


All times are GMT +1. The time now is 12:41 PM.

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

About Us

"It's about Microsoft Excel"