Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Workbook Address in VBA

Is it possible to get the web address of an Excel workbook using VBA.
The only address I can find in the VBA help refer to cell addresses, or
to the outlook address book.

The string I am looking for is that displayed in the 'address' field of
the 'web' toolbar.

Thanks for your help,
Donald

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Excel Workbook Address in VBA

Hi Donald,

Is it possible to get the web address of an Excel workbook using VBA.
The only address I can find in the VBA help refer to cell addresses,
or to the outlook address book.

The string I am looking for is that displayed in the 'address' field
of the 'web' toolbar.


AFAIK, you can use ThisWorkbook.FullName, which should return the full URL
(Path/Filename) of the workbook.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Workbook Address in VBA

"Jake Marx" wrote in message ...
The string I am looking for is that displayed in the 'address' field
of the 'web' toolbar.


AFAIK, you can use ThisWorkbook.FullName, which should return the full URL
(Path/Filename) of the workbook.


ThisWorkbook.FullName does return the full path of the workbook, which
is the same as the web address for local files.

Where the files are stored on a server, it is a bit different

ThisWorkbook.FullName gives the mapped drive and path like
Z:\path\to\file.xls which depends on the mapped drives on the local
computer.

The web toolbar gives \\server\full\path\to\file.xls which would work
for any computer that can connect to that server.

Thanks for your help though Jake.

Regards, Donald
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Excel Workbook Address in VBA

Hi Donald,

Not sure if this will work, but it's worth a try:

MsgBox Application.CommandBars("Web").Controls(10).Text

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Donald Noble wrote:
"Jake Marx" wrote in message
...
The string I am looking for is that displayed in the 'address' field
of the 'web' toolbar.


AFAIK, you can use ThisWorkbook.FullName, which should return the
full URL (Path/Filename) of the workbook.


ThisWorkbook.FullName does return the full path of the workbook, which
is the same as the web address for local files.

Where the files are stored on a server, it is a bit different

ThisWorkbook.FullName gives the mapped drive and path like
Z:\path\to\file.xls which depends on the mapped drives on the local
computer.

The web toolbar gives \\server\full\path\to\file.xls which would work
for any computer that can connect to that server.

Thanks for your help though Jake.

Regards, Donald

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Workbook Address in VBA


Jake Marx wrote:
Hi Donald,

Not sure if this will work, but it's worth a try:

MsgBox Application.CommandBars("Web").Controls(10).Text


That works perfectly, as long as the web toolbar hasn't been cutomised.

After some searching, trial, and errors, I found that the name of this
control is actually "Address:" including a colon!

so MsgBox Application.CommandBars("Web").Controls("Address:" ).Text
works as long as the Web toolbar has the address field.

Thanks again for your help

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
Code to send email to address within selection in Excel workbook vic1 Excel Discussion (Misc queries) 3 May 28th 08 09:51 PM
How do I avoid excel change absolute address to relative address Miguel Excel Discussion (Misc queries) 3 May 10th 07 11:18 PM
Address of workbook in a macro frendabrenda1 Excel Discussion (Misc queries) 8 March 8th 06 06:01 PM
Absolute address in Workbook linking rfhorn Excel Worksheet Functions 2 April 7th 05 02:59 PM
LINKING Address cells from an EXCEL spreadsheet to fill MapQuest Address Info Duane S. Meyer Excel Programming 0 August 30th 03 12:16 AM


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