PC Review


Reply
Thread Tools Rate Thread

ChDir "F:\dump" - not working

 
 
Madiya
Guest
Posts: n/a
 
      31st Aug 2011
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
 
Reply With Quote
 
 
 
 
Vacuum Sealed
Guest
Posts: n/a
 
      31st Aug 2011
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


 
Reply With Quote
 
Madiya
Guest
Posts: n/a
 
      2nd Sep 2011
On Aug 31, 4:14*pm, "Vacuum Sealed" <noodn...@gmail.com> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
some shortcut keys not working anymore-----help"""""""" wbrowse@gmail.com Windows XP Help 2 13th Apr 2007 02:15 PM
ReVIEW (Erratum): some shortcut keys not working anymore-----help""""""""PhpApach...WORK WELL!!!! wbrowse@gmail.com Windows XP Help 0 13th Apr 2007 12:29 PM
Still not working - ".SetFocus" on a form element and then havingthe combo box ".Dropdown" CES Microsoft Access VBA Modules 4 16th Jan 2007 09:28 PM
Group Policy "Hide specified Control Panel applets" not working for "Network Connections" Arie Slob Windows XP Security 5 24th Aug 2005 12:35 PM
DOS CD / CHDIR problem "unexpected". Newbie Windows XP Accessibility 1 15th Apr 2004 10:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:09 AM.