Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default Keeping from declaring a direct path

Hello.

I would like to know how I make a call to a file in a macro for opening
it without using explicit path calls.

In other words, I want to copy the entire directory to a USB drive and
use the workbook, and its macros from there.

My macros current make explicit call to paths that would not be present
for the USB drive version of my database.

What do I do to properly call a file? The old DOS method of
"./pathname/filename.xlsm"?

I already learned the other day that recording a macro doesn't always
work later if everything is not in the exact same state. I overwrote my
entire "main view sheet" because I left out workbook and sheet switching
and opening and selecting events.

I am learning,though.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Keeping from declaring a direct path

Try using the string returned from

ThisWorkbook.Path

Cheers,
Rob


CellShocked wrote:
Hello.

I would like to know how I make a call to a file in a macro for opening
it without using explicit path calls.

In other words, I want to copy the entire directory to a USB drive and
use the workbook, and its macros from there.

My macros current make explicit call to paths that would not be present
for the USB drive version of my database.

What do I do to properly call a file? The old DOS method of
"./pathname/filename.xlsm"?

I already learned the other day that recording a macro doesn't always
work later if everything is not in the exact same state. I overwrote my
entire "main view sheet" because I left out workbook and sheet switching
and opening and selecting events.

I am learning,though.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 277
Default Keeping from declaring a direct path

So I grab that value and pass it to my code segments whenever I need
to call a file not already open? Thanks, btw.



On Mon, 07 Dec 2009 19:20:12 +1300, Rob van Gelder
wrote:

Try using the string returned from

ThisWorkbook.Path

Cheers,
Rob


CellShocked wrote:
Hello.

I would like to know how I make a call to a file in a macro for opening
it without using explicit path calls.

In other words, I want to copy the entire directory to a USB drive and
use the workbook, and its macros from there.

My macros current make explicit call to paths that would not be present
for the USB drive version of my database.

What do I do to properly call a file? The old DOS method of
"./pathname/filename.xlsm"?

I already learned the other day that recording a macro doesn't always
work later if everything is not in the exact same state. I overwrote my
entire "main view sheet" because I left out workbook and sheet switching
and opening and selecting events.

I am learning,though.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Keeping from declaring a direct path

Yes, passing it that way would work.



CellShocked wrote:
So I grab that value and pass it to my code segments whenever I need
to call a file not already open? Thanks, btw.



On Mon, 07 Dec 2009 19:20:12 +1300, Rob van Gelder
wrote:

Try using the string returned from

ThisWorkbook.Path

Cheers,
Rob


CellShocked wrote:
Hello.

I would like to know how I make a call to a file in a macro for opening
it without using explicit path calls.

In other words, I want to copy the entire directory to a USB drive and
use the workbook, and its macros from there.

My macros current make explicit call to paths that would not be present
for the USB drive version of my database.

What do I do to properly call a file? The old DOS method of
"./pathname/filename.xlsm"?

I already learned the other day that recording a macro doesn't always
work later if everything is not in the exact same state. I overwrote my
entire "main view sheet" because I left out workbook and sheet switching
and opening and selecting events.

I am learning,though.

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
Direct Formula Rechie Excel Discussion (Misc queries) 7 October 20th 09 10:48 AM
direct your sum in the right box? ED CABE[_2_] Excel Programming 1 December 23rd 08 09:23 AM
Direct path to Worksheet matt Excel Discussion (Misc queries) 0 July 9th 08 02:24 AM
Direct DLL reference? XP Excel Programming 1 October 24th 07 10:11 PM
Can you direct me. Baha Excel Discussion (Misc queries) 3 June 22nd 07 08:56 AM


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