LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default setting up a workdirectory

Niek,

First off, you shouldn't use Dir as a variable name because Dir is a
reserved word in VBA. Instead, use sDir or something. Then, use code like

Dim sDir As String
sDir = Range("A119").Value
ChDrive sDir
ChDir sDir


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"solo_razor" wrote in message
...
Hello,

i have a problem with a directory. The following is pre programmed
In my sheet cell a119 contains a value c:\windows\desktop

later in the vba code this value has given a variable
dir = activesheet.range("a119").value
dir is now know as c:\windows\desktop

Now i am working on a sheet that must be saved under a name in this dir
directory

chdir = dir
returns argument not optimal, does anybody knows how it schould be.

Regards,
Niek



------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



 
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
setting default filter setting tpeter Charts and Charting in Excel 0 December 4th 09 02:50 PM
Setting up dates Jo Excel Worksheet Functions 1 May 17th 06 02:57 AM
Setting up a statement cosmo investments Setting up and Configuration of Excel 0 May 11th 05 03:26 AM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM
Setting default Tab Name Cameron[_2_] Excel Programming 3 July 31st 03 11:02 PM


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