Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Extract MS Query Cell Address

When I Import Data (MS Query) into my spreadsheet is asks for destination
cell. Is it possible to extract this cell address from the MS Query object
after-the-fact?

Thanks
EM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Extract MS Query Cell Address

The querry Name and Range becomes a defined Name on the worksheet. You can
view the range on the worksheet by going to menu and doing the following

File - Properties - Contents


Use this VBA code to see all names including querry name

For Each myname In ThisWorkbook.Names
MsgBox (myname.Name & " Range is : " & myname)
Next myname:

When I Import Data (MS Query) into my spreadsheet is asks for destination
cell. Is it possible to extract this cell address from the MS Query object
after-the-fact?

Thanks
EM

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Extract MS Query Cell Address

This almost gets me there but I will need a way to differentiate between the
named cells. Don't think there is a way to do that.

EM

"Joel" wrote:

The querry Name and Range becomes a defined Name on the worksheet. You can
view the range on the worksheet by going to menu and doing the following

File - Properties - Contents


Use this VBA code to see all names including querry name

For Each myname In ThisWorkbook.Names
MsgBox (myname.Name & " Range is : " & myname)
Next myname:

When I Import Data (MS Query) into my spreadsheet is asks for destination
cell. Is it possible to extract this cell address from the MS Query object
after-the-fact?

Thanks
EM

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Extract MS Query Cell Address

Dim rng as range
set rng = ActiveSheet.QueryTables(1).ResultRange
msgbox rng.Cells(1, 1).Address

--
Tim Zych
SF, CA

"ExcelMonkey" wrote in message
...
When I Import Data (MS Query) into my spreadsheet is asks for destination
cell. Is it possible to extract this cell address from the MS Query
object
after-the-fact?

Thanks
EM



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
How do I extract a string from an IP address in Excel? mardoh Excel Discussion (Misc queries) 2 February 3rd 10 02:54 PM
Extract address data Marco Margaritelli Excel Worksheet Functions 2 August 31st 09 07:58 PM
How to extract email address in hyperlink Brossyg Excel Worksheet Functions 6 January 27th 07 03:32 PM
How to extract a web address from a hyperlink cell? El Rebelde Excel Discussion (Misc queries) 2 November 16th 06 04:44 PM
How do I extract the address from a hyperlink in excell ? SMcLarenOr Excel Discussion (Misc queries) 0 April 26th 06 10:18 PM


All times are GMT +1. The time now is 10:29 PM.

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"