Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Workbooks.Open with out full path help needed.

Below is the first part of a macro that works 'almost' perfectly.

In my macro, I don't want to use the 'full path' to the file, because I
move the set of files to different directories at times. The macro works
well on my Macintosh without a full path.

The macro will open the "testfile.xls" when called, if the file has been
perviously opened once, via the 'File' menu in Excel. However, opening
the testfile.xls via Windows Explorer does not work for the macro. I'd
like to be able to either not have to manually open the file, or at
least be able to open the file in Windows Explorer without using the
File menu.

The file can then be closed and the macro will open the file if I
haven't quit and restarted Excel, and if the file was opened via the
File menu.

The "testfile.xls" is in the same directory as the Excel file that is
running the macro.

First part of macro here...

Sub QuoteCopy_Tester()
Application.ScreenUpdating = False
Workbooks.Open FileName:="testfile.xls"
Range("QuoteArea").Select

....macro continues.

Thanks for the help.

Sorry if I've talked in circles.

-Dennis
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Workbooks.Open with out full path help needed.

Sub QuoteCopy_Tester()
Dim dir As String
Application.ScreenUpdating = False
dir = ActiveWorkbook.Path
Workbooks.Open Filename:=dir & "\testfile.xls"

Try this..
I think this can help you out.

Best

Petter

dk_ skrev:

Below is the first part of a macro that works 'almost' perfectly.

In my macro, I don't want to use the 'full path' to the file, because I
move the set of files to different directories at times. The macro works
well on my Macintosh without a full path.

The macro will open the "testfile.xls" when called, if the file has been
perviously opened once, via the 'File' menu in Excel. However, opening
the testfile.xls via Windows Explorer does not work for the macro. I'd
like to be able to either not have to manually open the file, or at
least be able to open the file in Windows Explorer without using the
File menu.

The file can then be closed and the macro will open the file if I
haven't quit and restarted Excel, and if the file was opened via the
File menu.

The "testfile.xls" is in the same directory as the Excel file that is
running the macro.

First part of macro here...

Sub QuoteCopy_Tester()
Application.ScreenUpdating = False
Workbooks.Open FileName:="testfile.xls"
Range("QuoteArea").Select

....macro continues.

Thanks for the help.

Sorry if I've talked in circles.

-Dennis

  #3   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Workbooks.Open with out full path help needed.

Petter,

Your code below definitely works in Excel97. Thank you.

....But ...it breaks my macro when run on my Macintosh with Excel98.

Any more ideas for solving this inconvenience?

On the Mac, my previous macros worked under all conditions (i.e., I did
not have to use the 'File' 'Open' menu to run the proceedure. I would
like to have the Macro be movable if possible, between Excel97 and
Excel98 (Mac).


This line below does not work on the Mac...

Workbooks.Open Filename:=dir & "\testfile.xls"


Thanks your help.

-Dennis




In article ,
Fingerjob wrote:

Sub QuoteCopy_Tester()
Dim dir As String
Application.ScreenUpdating = False
dir = ActiveWorkbook.Path
Workbooks.Open Filename:=dir & "\testfile.xls"

Try this..
I think this can help you out.

Best

Petter

dk_ skrev:

Below is the first part of a macro that works 'almost' perfectly.

In my macro, I don't want to use the 'full path' to the file, because I
move the set of files to different directories at times. The macro works
well on my Macintosh without a full path.

The macro will open the "testfile.xls" when called, if the file has been
perviously opened once, via the 'File' menu in Excel. However, opening
the testfile.xls via Windows Explorer does not work for the macro. I'd
like to be able to either not have to manually open the file, or at
least be able to open the file in Windows Explorer without using the
File menu.

The file can then be closed and the macro will open the file if I
haven't quit and restarted Excel, and if the file was opened via the
File menu.

The "testfile.xls" is in the same directory as the Excel file that is
running the macro.

First part of macro here...

Sub QuoteCopy_Tester()
Application.ScreenUpdating = False
Workbooks.Open FileName:="testfile.xls"
Range("QuoteArea").Select

....macro continues.

Thanks for the help.

Sorry if I've talked in circles.

-Dennis

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Workbooks.Open with out full path help needed.

maybe...

Sub QuoteCopy_Tester()
Dim mydir As String
Application.ScreenUpdating = False
mydir = ActiveWorkbook.Path
Workbooks.Open Filename:=mydir & application.pathseparator & "testfile.xls"
End Sub

dk_ wrote:

Petter,

Your code below definitely works in Excel97. Thank you.

...But ...it breaks my macro when run on my Macintosh with Excel98.

Any more ideas for solving this inconvenience?

On the Mac, my previous macros worked under all conditions (i.e., I did
not have to use the 'File' 'Open' menu to run the proceedure. I would
like to have the Macro be movable if possible, between Excel97 and
Excel98 (Mac).

This line below does not work on the Mac...

Workbooks.Open Filename:=dir & "\testfile.xls"

Thanks your help.

-Dennis

In article ,
Fingerjob wrote:

Sub QuoteCopy_Tester()
Dim dir As String
Application.ScreenUpdating = False
dir = ActiveWorkbook.Path
Workbooks.Open Filename:=dir & "\testfile.xls"

Try this..
I think this can help you out.

Best

Petter

dk_ skrev:

Below is the first part of a macro that works 'almost' perfectly.

In my macro, I don't want to use the 'full path' to the file, because I
move the set of files to different directories at times. The macro works
well on my Macintosh without a full path.

The macro will open the "testfile.xls" when called, if the file has been
perviously opened once, via the 'File' menu in Excel. However, opening
the testfile.xls via Windows Explorer does not work for the macro. I'd
like to be able to either not have to manually open the file, or at
least be able to open the file in Windows Explorer without using the
File menu.

The file can then be closed and the macro will open the file if I
haven't quit and restarted Excel, and if the file was opened via the
File menu.

The "testfile.xls" is in the same directory as the Excel file that is
running the macro.

First part of macro here...

Sub QuoteCopy_Tester()
Application.ScreenUpdating = False
Workbooks.Open FileName:="testfile.xls"
Range("QuoteArea").Select

....macro continues.

Thanks for the help.

Sorry if I've talked in circles.

-Dennis


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Workbooks.Open with out full path help needed.

....Maybe perfectly! :)

Dave,

I just tested your modification below with both Excel98 (Mac), and with
Excel 97 (Window). Both machines played perfectly with the code.

The macro works on both machine. Great trick!

Thank you.

-Dennis



In article ,
Dave Peterson wrote:

maybe...

Sub QuoteCopy_Tester()
Dim mydir As String
Application.ScreenUpdating = False
mydir = ActiveWorkbook.Path
Workbooks.Open Filename:=mydir & application.pathseparator & "testfile.xls"
End Sub

dk_ wrote:

Petter,

Your code below definitely works in Excel97. Thank you.

...But ...it breaks my macro when run on my Macintosh with Excel98.

Any more ideas for solving this inconvenience?

On the Mac, my previous macros worked under all conditions (i.e., I did
not have to use the 'File' 'Open' menu to run the proceedure. I would
like to have the Macro be movable if possible, between Excel97 and
Excel98 (Mac).

This line below does not work on the Mac...

Workbooks.Open Filename:=dir & "\testfile.xls"

Thanks your help.

-Dennis

In article ,
Fingerjob wrote:

Sub QuoteCopy_Tester()
Dim dir As String
Application.ScreenUpdating = False
dir = ActiveWorkbook.Path
Workbooks.Open Filename:=dir & "\testfile.xls"

Try this..
I think this can help you out.

Best

Petter

dk_ skrev:

Below is the first part of a macro that works 'almost' perfectly.

In my macro, I don't want to use the 'full path' to the file, because I
move the set of files to different directories at times. The macro works
well on my Macintosh without a full path.

The macro will open the "testfile.xls" when called, if the file has been
perviously opened once, via the 'File' menu in Excel. However, opening
the testfile.xls via Windows Explorer does not work for the macro. I'd
like to be able to either not have to manually open the file, or at
least be able to open the file in Windows Explorer without using the
File menu.

The file can then be closed and the macro will open the file if I
haven't quit and restarted Excel, and if the file was opened via the
File menu.

The "testfile.xls" is in the same directory as the Excel file that is
running the macro.

First part of macro here...

Sub QuoteCopy_Tester()
Application.ScreenUpdating = False
Workbooks.Open FileName:="testfile.xls"
Range("QuoteArea").Select

....macro continues.

Thanks for the help.

Sorry if I've talked in circles.

-Dennis



  #6   Report Post  
Posted to microsoft.public.excel.misc
dk_ dk_ is offline
external usenet poster
 
Posts: 70
Default Workbooks.Open with out full path help needed.

Dave,

I also tested your code (below), leaving out the following line...

Dim mydir As String

The macro ran perfectly on both the Macintosh and
on the Window machine, without the line above.

Thank you!

-Dennis

--
Dennis Kessler
http://www.denniskessler.com/acupuncture


In article
,
dk_ wrote:

...Maybe perfectly! :)

Dave,

I just tested your modification below with both Excel98 (Mac), and with
Excel 97 (Window). Both machines played perfectly with the code.

The macro works on both machine. Great trick!

Thank you.

-Dennis



In article ,
Dave Peterson wrote:

maybe...

Sub QuoteCopy_Tester()
Dim mydir As String
Application.ScreenUpdating = False
mydir = ActiveWorkbook.Path
Workbooks.Open Filename:=mydir & application.pathseparator & "testfile.xls"
End Sub

dk_ wrote:

Petter,

Your code below definitely works in Excel97. Thank you.

...But ...it breaks my macro when run on my Macintosh with Excel98.

Any more ideas for solving this inconvenience?

On the Mac, my previous macros worked under all conditions (i.e., I did
not have to use the 'File' 'Open' menu to run the proceedure. I would
like to have the Macro be movable if possible, between Excel97 and
Excel98 (Mac).

This line below does not work on the Mac...

Workbooks.Open Filename:=dir & "\testfile.xls"

Thanks your help.

-Dennis

In article ,
Fingerjob wrote:

Sub QuoteCopy_Tester()
Dim dir As String
Application.ScreenUpdating = False
dir = ActiveWorkbook.Path
Workbooks.Open Filename:=dir & "\testfile.xls"

Try this..
I think this can help you out.

Best

Petter

dk_ skrev:

Below is the first part of a macro that works 'almost' perfectly.

In my macro, I don't want to use the 'full path' to the file, because
I
move the set of files to different directories at times. The macro
works
well on my Macintosh without a full path.

The macro will open the "testfile.xls" when called, if the file has
been
perviously opened once, via the 'File' menu in Excel. However,
opening
the testfile.xls via Windows Explorer does not work for the macro.
I'd
like to be able to either not have to manually open the file, or at
least be able to open the file in Windows Explorer without using the
File menu.

The file can then be closed and the macro will open the file if I
haven't quit and restarted Excel, and if the file was opened via the
File menu.

The "testfile.xls" is in the same directory as the Excel file that is
running the macro.

First part of macro here...

Sub QuoteCopy_Tester()
Application.ScreenUpdating = False
Workbooks.Open FileName:="testfile.xls"
Range("QuoteArea").Select

....macro continues.

Thanks for the help.

Sorry if I've talked in circles.

-Dennis

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
Full path possible to be seen? Octavio New Users to Excel 10 July 2nd 06 08:51 PM
Indirect does not recognize full server path? Matt Excel Worksheet Functions 3 January 6th 06 09:18 PM
full UNC path in footer muttdaemon Excel Discussion (Misc queries) 1 October 12th 05 06:21 PM
full path of excel file Song Excel Discussion (Misc queries) 2 August 21st 05 06:50 PM
How to change the Excel Title Bar to show the full file path na... lmilkey8855 Excel Discussion (Misc queries) 2 January 6th 05 03:08 PM


All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"