GetFileExtension – The extension in a filename
‘ Return the extension of a file nameFunction GetFileExtension(ByVal FileName As String) As String Dim i As Long For i = Len(FileName) To 1 Step -1 Select Case Mid$(FileName, i,
‘ Return the extension of a file nameFunction GetFileExtension(ByVal FileName As String) As String Dim i As Long For i = Len(FileName) To 1 Step -1 Select Case Mid$(FileName, i,
‘ Make a complete file name by assemblying its individual parts’ if Extension isn’t omitted, it overwrites any extension held in BaseNameFunction MakeFileName(Drive As String, Path As String, BaseName As
‘ Retrieve a file’s base name’ if the second argument is true, the result include the file’s pathFunction GetFileBaseName(FileName As String, Optional ByVal IncludePath As _ Boolean) As String Dim
The Procedure Attributes dialog includes a Procedure ID combo box, that lets you associate a particular ID to a given member of the class. You usually use this combo to
Many developers incorrectly assume that a printer is always installed on their customers’ machines, and therefore omit to check that this is actually the case. The following function, deceiptively trivial,
The Picture box control does not directly expose any property that returns information on the bitmap currently loaded. You can retrieve this information by calling the GetObject API function, passing
Private Declare Function PrinterProperties Lib “winspool.drv” (ByVal hwnd As _ Long, ByVal hPrinter As Long) As LongPrivate Declare Function OpenPrinter Lib “winspool.drv” Alias “OpenPrinterA” _ (ByVal pPrinterName As String, phPrinter
There are a few tricks that you can do with LCase$ and UCase$ functions. I doubt you will be using this tip in all your applications, but here they are
‘ Retrieve a file’s path” Note: trailing backslashes are never included in the resultFunction GetFilePath(FileName As String) As String Dim i As Long For i = Len(FileName) To 1 Step