Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify drive letter
Is it possible to find the path of the windows folder when excel first runs
using vba? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
identify drive letter
Not sure what your question has to do with the subject of your posting, but
here is how to get the path for the Windows folder. Put this code in a Module... Private Declare Function GetWindowsDirectory Lib "kernel32" _ Alias "GetWindowsDirectoryA" _ (ByVal lpBuffer As String, _ ByVal nSize As Long) As Long Public Function WindowsPath() As String Dim Buffer As String * 260 GetWindowsDirectory Buffer, 260 WindowsPath = Left(Buffer, InStr(Buffer, Chr(0)) - 1) End Function and then call it from anywhere within your own code to get the Windows folder; for example... MsgBox WindowsPath -- Rick (MVP - Excel) "sunilpatel" wrote in message ... Is it possible to find the path of the windows folder when excel first runs using vba? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save workbook To any USB Drive no matter what drive letter | Excel Programming | |||
Import from MS Access - Lose the drive letter..link only to drive | Excel Programming | |||
Obtain drive letter assignment of CD/DVD drive? | Excel Discussion (Misc queries) | |||
Identify Load Drive | Excel Programming | |||
Identify CD-Rom drive | Excel Programming |