Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to get the full path name of the open workbook in a macro

How can I get the full path name for the open workbook using a macro? I
have tried using the CurDir() function but it is not working.

eg. If I open my workbook from C:\Data\Excel\, I want to be able to get
this string "C:\Data\Excel\"

I am using excel 2000 on Win98SE


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default How to get the full path name of the open workbook in a macro

How can I get the full path name for the open workbook using a macro? I
have tried using the CurDir() function but it is not working.

eg. If I open my workbook from C:\Data\Excel\, I want to be able to get
this string "C:\Data\Excel\"


try this:

strPath = ActiveWorkbook.Path & "\"

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default How to get the full path name of the open workbook in a macro

ThisWorkbook.Path & Application.PathSeparator

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Flystar " wrote in message
...
How can I get the full path name for the open workbook using a macro? I
have tried using the CurDir() function but it is not working.

eg. If I open my workbook from C:\Data\Excel\, I want to be able to get
this string "C:\Data\Excel\"

I am using excel 2000 on Win98SE


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to get the full path name of the open workbook in a macro

Thank you for your replies. I have chosen to go with a combination:

ActiveWorkbook.Path & Application.PathSeparato

--
Message posted from http://www.ExcelForum.com

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 to see full path name of open workbook? Joe User[_2_] Excel Discussion (Misc queries) 5 March 21st 10 08:29 PM
Macro to open Workbook in default path. Richard Excel Discussion (Misc queries) 2 October 7th 07 02:24 PM
How to Display Full Path for File Diplayed at Top Of Workbook XRacr Excel Discussion (Misc queries) 1 February 1st 07 08:41 PM
Workbooks.Open with out full path help needed. dk_ Excel Discussion (Misc queries) 5 November 16th 06 02:40 AM
Getting the full path when from a File Open Dialog Box Ric Payne Excel Programming 3 July 10th 03 04:58 PM


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