Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Get external data by dynamical url - no update

Hi there,

i have a problem to update my external data. I read a URL from the
Field B5 and then i try to connect to this URL and read my datas but
Excel doesnt update this data when i change the URL. I guess this
problem is related to the "import data" dialog in Excel, but i'm not
sure.

here is my code:


'Read the current URL
Sheets("Sheet1").Select
Dim zelle
zelle = "B5"
Dim wert
wert = Range(zelle).value

'update sheet
Sheets("Sheet2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & wert & "" _
, Destination:=Range("A1"))
.Name = "AlertUser"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = _
"""Header_g_a134c740_e525_4177_bdd8_e384ed89782d_a lertstable"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


I hope that anyone can help me.

Best Regards

Julian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Get external data by dynamical url - no update

no ideas?


drofluga schrieb:

Hi there,

i have a problem to update my external data. I read a URL from the
Field B5 and then i try to connect to this URL and read my datas but
Excel doesnt update this data when i change the URL. I guess this
problem is related to the "import data" dialog in Excel, but i'm not
sure.

here is my code:


'Read the current URL
Sheets("Sheet1").Select
Dim zelle
zelle = "B5"
Dim wert
wert = Range(zelle).value

'update sheet
Sheets("Sheet2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & wert & "" _
, Destination:=Range("A1"))
.Name = "AlertUser"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = _
"""Header_g_a134c740_e525_4177_bdd8_e384ed89782d_a lertstable"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


I hope that anyone can help me.

Best Regards

Julian


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Get external data by dynamical url - no update

can you not try an event code like
worksheet_change.
so that if the target value is changed the corresponding url is opened.


"drofluga" wrote in message
ps.com...
no ideas?


drofluga schrieb:

Hi there,

i have a problem to update my external data. I read a URL from the
Field B5 and then i try to connect to this URL and read my datas but
Excel doesnt update this data when i change the URL. I guess this
problem is related to the "import data" dialog in Excel, but i'm not
sure.

here is my code:


'Read the current URL
Sheets("Sheet1").Select
Dim zelle
zelle = "B5"
Dim wert
wert = Range(zelle).value

'update sheet
Sheets("Sheet2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & wert & "" _
, Destination:=Range("A1"))
.Name = "AlertUser"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = _
"""Header_g_a134c740_e525_4177_bdd8_e384ed89782d_a lertstable"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


I hope that anyone can help me.

Best Regards

Julian




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Get external data by dynamical url - no update

Thanks for you idea, but the URL is always correct. Excel only doesnt
put the data into the sheet when i change the url.

regards,

R..VENKATARAMAN schrieb:

can you not try an event code like
worksheet_change.
so that if the target value is changed the corresponding url is opened.


"drofluga" wrote in message
ps.com...
no ideas?


drofluga schrieb:

Hi there,

i have a problem to update my external data. I read a URL from the
Field B5 and then i try to connect to this URL and read my datas but
Excel doesnt update this data when i change the URL. I guess this
problem is related to the "import data" dialog in Excel, but i'm not
sure.

here is my code:


'Read the current URL
Sheets("Sheet1").Select
Dim zelle
zelle = "B5"
Dim wert
wert = Range(zelle).value

'update sheet
Sheets("Sheet2").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & wert & "" _
, Destination:=Range("A1"))
.Name = "AlertUser"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = _
"""Header_g_a134c740_e525_4177_bdd8_e384ed89782d_a lertstable"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


I hope that anyone can help me.

Best Regards

Julian



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
External Data Warning Message - I have No External Data in wrkbk Cass_makeitfun[_2_] Excel Discussion (Misc queries) 0 May 12th 10 09:02 PM
Update data from an external Excel spreadsheet marg Excel Programming 0 July 18th 06 02:37 PM
Update External Data source from Excel sheet Lara Jacobs Excel Discussion (Misc queries) 2 March 28th 06 07:17 AM
How to create a chart based on a 2 dim data range dynamical in 1 d Beertje Charts and Charting in Excel 1 October 25th 05 11:54 AM
Pivot table won't refresh after external data update on open Aaron Excel Programming 0 October 28th 04 02:51 PM


All times are GMT +1. The time now is 12:25 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"