Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code to send email to address within selection in Excel workbook | Excel Discussion (Misc queries) | |||
How do I avoid excel change absolute address to relative address | Excel Discussion (Misc queries) | |||
Address of workbook in a macro | Excel Discussion (Misc queries) | |||
Absolute address in Workbook linking | Excel Worksheet Functions | |||
LINKING Address cells from an EXCEL spreadsheet to fill MapQuest Address Info | Excel Programming |