Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
DIM Variant / String
Hi...I have the following MACRO where I save one WorkSheet as a *.CSV file
and then want to email it to one receipient. I have a problem with the DIM Varient/String in order to keep the "Fname" As it is, it emails a CSV-file but not with the Fname. thanks - Helmut ------------------ Public Sub DoTheExport() Dim Fname As Variant Dim wb As Workbook Fname = Application.GetSaveAsFilename("c:\MESSER\MESSERmmy y", fileFilter:="CSV Files (*.csv), *.csv") If Fname = False Then MsgBox "You didn't select a file" Exit Sub End If 'Running the Public Sub below ExportToTextFile CStr(Fname), ",", False Application.ScreenUpdating = False ActiveSheet.Copy Set wb = ActiveWorkbook With wb .SendMail ", _ "This is the Subject line" .Close False End With Kill Fname Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
String to Variant incorrect conversion | Excel Worksheet Functions | |||
Variant | Excel Programming | |||
Retain Variant / String value | Excel Programming | |||
Variant Array with String Values - Type Mismatch | Excel Programming | |||
Variant to String | Excel Programming |