Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get the folder name of thisworkbook
Hi,
I need some help, How do i get the name of the folder where my .xls contain i do not need the whole path just the folder where this active .xls is in. file will be save in different folder, therefore i need the macro to just get the direct folder of where this .xls is in. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get the folder name of thisworkbook
Dim Foldername As String
With ThisWorkbook Foldername = Right$(.Path, Len(.Path) - InStrRev(.Path, Application.PathSeparator)) MsgBox Foldername End With -- __________________________________ HTH Bob "Edward" wrote in message ... Hi, I need some help, How do i get the name of the folder where my .xls contain i do not need the whole path just the folder where this active .xls is in. file will be save in different folder, therefore i need the macro to just get the direct folder of where this .xls is in. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to get the folder name of thisworkbook
Thanks Bob,
You help me exactly what i wanted, really appreciated "Bob Phillips" wrote: Dim Foldername As String With ThisWorkbook Foldername = Right$(.Path, Len(.Path) - InStrRev(.Path, Application.PathSeparator)) MsgBox Foldername End With -- __________________________________ HTH Bob "Edward" wrote in message ... Hi, I need some help, How do i get the name of the folder where my .xls contain i do not need the whole path just the folder where this active .xls is in. file will be save in different folder, therefore i need the macro to just get the direct folder of where this .xls is in. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Remove end folder from path found with ThisWorkbook.Path command ? | Excel Programming | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? | Excel Discussion (Misc queries) | |||
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? | Excel Programming |