PC Review


Reply
Thread Tools Rate Thread

Active directory

 
 
David
Guest
Posts: n/a
 
      24th Jun 2009

Hi Group,

How do ID the directory that the active file is in with code?

Thanks,
David
 
Reply With Quote
 
 
 
 
Per Jessen
Guest
Posts: n/a
 
      24th Jun 2009

Hi

Try this:

CurrentPath = ActiveWorkbook.Path

Regards,
Per

"David" <(E-Mail Removed)> skrev i meddelelsen
news:5F69EB05-5FEA-401C-9E5E-(E-Mail Removed)...
> Hi Group,
>
> How do ID the directory that the active file is in with code?
>
> Thanks,
> David


 
Reply With Quote
 
David
Guest
Posts: n/a
 
      24th Jun 2009

Hello Per,

I thought all I needed was what you provided to do what I wanted to do,
which is to open all the files in the current directory. This is what I was
hoping would work, but it is not:

Sub OpenAllFiles()
'David Lanman 5/2/2009
Dim strFile
Dim strFolder
strFolder = ActiveWorkbook.Path
strFolderSave = ActiveWorkbook.Path
strFile = Dir(strFolder & "*.*", vbNormal)
Do While strFile <> ""
MsgBox strFile
Workbooks.Open Filename:= _
strFolder & strFile
'do something
ActiveWorkbook.SaveAs Filename:= _
strFolderSave & "/" & strFile
ActiveWorkbook.Close
strFile = Dir
Loop
End Sub

The strFile is empty. There is extra code, in that when I save it will be to
the same directory.

Thanks for your help,
David

"Per Jessen" wrote:

> Hi
>
> Try this:
>
> CurrentPath = ActiveWorkbook.Path
>
> Regards,
> Per
>
> "David" <(E-Mail Removed)> skrev i meddelelsen
> news:5F69EB05-5FEA-401C-9E5E-(E-Mail Removed)...
> > Hi Group,
> >
> > How do ID the directory that the active file is in with code?
> >
> > Thanks,
> > David

>
>

 
Reply With Quote
 
David
Guest
Posts: n/a
 
      24th Jun 2009

Figured it out. Thanks


"Per Jessen" wrote:

> Hi
>
> Try this:
>
> CurrentPath = ActiveWorkbook.Path
>
> Regards,
> Per
>
> "David" <(E-Mail Removed)> skrev i meddelelsen
> news:5F69EB05-5FEA-401C-9E5E-(E-Mail Removed)...
> > Hi Group,
> >
> > How do ID the directory that the active file is in with code?
> >
> > Thanks,
> > David

>
>

 
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
question on upgrading from active directory 2000 to active directory 2003 Gary M Microsoft Windows 2000 Active Directory 2 16th Mar 2007 07:57 PM
Active Directory, Active Directory Federation Services and Microsoft Integration Identiy Server Mas Libman [MSFT] Microsoft Windows 2000 Active Directory 0 6th May 2005 10:55 PM
[Active Directory] On what ground does LDAP connect to Active Directory RTT Microsoft VB .NET 0 12th Apr 2005 04:20 PM
Arguments for 2003 Active directory versus 2000 active directory? =?Utf-8?B?c3RlcGhlbmJiYWtlcg==?= Microsoft Windows 2000 Active Directory 4 23rd Dec 2003 04:40 AM
compatibility between W2K Active Directory and W2k3 Active Directory Dani Microsoft Windows 2000 Active Directory 1 15th Sep 2003 11:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:20 PM.