Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default ChDir "F:\dump" - not working

I am using xl2007.
Im my macro, I am trying to change link in all cells by pointing them
to the new file.
I have tried only file name with chdir and full file name with path
but none works.
ChDir "F:\dump" is not changing the dir at all. Excel still keep
pointing to my documents.

Its simple but I cant get it straight.
Pl help.

Regards,
Madiya
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default ChDir "F:\dump" - not working

Hi Madiya

Try this:

ChDrive "F:\"
ChDir "F:\Dump"
FileToOpen = Application.GetOpenFilename _
(Title:="Select a File", _
FileFilter:="Excel Files *.xls (*.xls),")

If FileToOpen = False Then
MsgBox "No File has been Selected.", vbExclamation, "Doh!!!"
Exit Sub
Else
Workbooks.Open Filename:=FileToOpen
End If

HTH
Mick


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 239
Default ChDir "F:\dump" - not working

On Aug 31, 4:14*pm, "Vacuum Sealed" wrote:
HiMadiya

Try this:

* * ChDrive "F:\"
* * ChDir "F:\Dump"
* * FileToOpen = Application.GetOpenFilename _
* * (Title:="Select a File", _
* * FileFilter:="Excel Files *.xls (*.xls),")

* * If FileToOpen = False Then
* * MsgBox "No File has been Selected.", vbExclamation, "Doh!!!"
* * Exit Sub
* * Else
* * Workbooks.Open Filename:=FileToOpen
* * End If

HTH
Mick


It worked.
Thanks a ton.

Regards,
Madiya
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
Delete all sheets in workbook that contain "Dump" in the name Porr via OfficeKB.com Excel Worksheet Functions 2 May 19th 10 10:25 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Replace(ActiveCell.Formula, "Round(","") not working as expected Dennis Excel Programming 3 May 16th 07 04:49 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Working out age from "Day" "Month" "Year" timmyc Excel Worksheet Functions 4 February 5th 06 03:07 PM


All times are GMT +1. The time now is 11:26 PM.

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"