Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
String to Variant incorrect conversion Paul Excel Worksheet Functions 1 October 4th 07 01:11 AM
Variant owl527[_5_] Excel Programming 2 October 14th 05 09:37 PM
Retain Variant / String value abc[_6_] Excel Programming 3 September 14th 05 07:50 AM
Variant Array with String Values - Type Mismatch jamiee Excel Programming 2 March 7th 04 03:39 AM
Variant to String Chip Pearson Excel Programming 1 September 3rd 03 03:10 PM


All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"