ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Ron on email code (https://www.excelbanter.com/excel-programming/393258-ron-email-code.html)

John

Ron on email code
 
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = "
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?

Ron de Bruin

Ron on email code
 
Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = "
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?


John

Ron on email code
 
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = "
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?



Ron de Bruin

Ron on email code
 
Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = "
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?



John

Ron on email code
 
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?



Ron de Bruin

Ron on email code
 
Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?



John

Ron on email code
 
how do I do that? what is your email and this line works... but not the
whole sheet... i may just go with that

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

"Ron de Bruin" wrote:

Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?




Ron de Bruin

Ron on email code
 
There are two examples on my site

One for a chart on a sheet and one for a chart sheet

I think you used the wrong one
http://www.rondebruin.nl/mail/folder2/chart.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
how do I do that? what is your email and this line works... but not the
whole sheet... i may just go with that

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

"Ron de Bruin" wrote:

Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?




John

Ron on email code
 
well I switched the format of h:mm:ss in the file name and that cause a
problem in another piece of code and may have been the culprit here as well.
I am all set now with what I need, thank you for your help

"Ron de Bruin" wrote:

There are two examples on my site

One for a chart on a sheet and one for a chart sheet

I think you used the wrong one
http://www.rondebruin.nl/mail/folder2/chart.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
how do I do that? what is your email and this line works... but not the
whole sheet... i may just go with that

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

"Ron de Bruin" wrote:

Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?





Ron de Bruin

Ron on email code
 
You are welcome

Thanks for the feedback


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
well I switched the format of h:mm:ss in the file name and that cause a
problem in another piece of code and may have been the culprit here as well.
I am all set now with what I need, thank you for your help

"Ron de Bruin" wrote:

There are two examples on my site

One for a chart on a sheet and one for a chart sheet

I think you used the wrong one
http://www.rondebruin.nl/mail/folder2/chart.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
how do I do that? what is your email and this line works... but not the
whole sheet... i may just go with that

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

"Ron de Bruin" wrote:

Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?





John

Ron on email code
 
Well, I can export just a chart, but if I try an export a sheet I cannot do
it. Can I send you my test sheet which doesn't work.. very simple.

whats your email

"Ron de Bruin" wrote:

You are welcome

Thanks for the feedback


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
well I switched the format of h:mm:ss in the file name and that cause a
problem in another piece of code and may have been the culprit here as well.
I am all set now with what I need, thank you for your help

"Ron de Bruin" wrote:

There are two examples on my site

One for a chart on a sheet and one for a chart sheet

I think you used the wrong one
http://www.rondebruin.nl/mail/folder2/chart.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
how do I do that? what is your email and this line works... but not the
whole sheet... i may just go with that

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

"Ron de Bruin" wrote:

Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?






Ron de Bruin

Ron on email code
 
Yes

You can find my E-mail here
http://www.rondebruin.nl/

Bed time soon for me so I think I reply tomorrow


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
Well, I can export just a chart, but if I try an export a sheet I cannot do
it. Can I send you my test sheet which doesn't work.. very simple.

whats your email

"Ron de Bruin" wrote:

You are welcome

Thanks for the feedback


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
well I switched the format of h:mm:ss in the file name and that cause a
problem in another piece of code and may have been the culprit here as well.
I am all set now with what I need, thank you for your help

"Ron de Bruin" wrote:

There are two examples on my site

One for a chart on a sheet and one for a chart sheet

I think you used the wrong one
http://www.rondebruin.nl/mail/folder2/chart.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
how do I do that? what is your email and this line works... but not the
whole sheet... i may just go with that

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

"Ron de Bruin" wrote:

Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?






Ron de Bruin

Ron on email code
 
Update: John was trying to use export on a normal worksheet instead of a Chart sheet

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
Yes

You can find my E-mail here
http://www.rondebruin.nl/

Bed time soon for me so I think I reply tomorrow


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
Well, I can export just a chart, but if I try an export a sheet I cannot do
it. Can I send you my test sheet which doesn't work.. very simple.

whats your email

"Ron de Bruin" wrote:

You are welcome

Thanks for the feedback


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
well I switched the format of h:mm:ss in the file name and that cause a
problem in another piece of code and may have been the culprit here as well.
I am all set now with what I need, thank you for your help

"Ron de Bruin" wrote:

There are two examples on my site

One for a chart on a sheet and one for a chart sheet

I think you used the wrong one
http://www.rondebruin.nl/mail/folder2/chart.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
how do I do that? what is your email and this line works... but not the
whole sheet... i may just go with that

ActiveWorkbook.Worksheets("Sheet1").ChartObjects(" Chart 1").Chart.Export _
Filename:=Fname, FilterName:="GIF"

"Ron de Bruin" wrote:

Can you send me the file private John

I will test it for you then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
unfortunatly I get the same thing... strange. Do I need any VBA options
checked?

"Ron de Bruin" wrote:

Hi John

I test it on a machine with your Win/Excel version without problems
Do you have another machine to test it on ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
windows xp and excell2003

"Ron de Bruin" wrote:

Hi John

Which Windows and Excel version do you use


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"John" wrote in message ...
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438
Sub emailimpulse()
'Working in 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim Fname As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

'fill in the file path/name of the gif file
Fname = "C:\My_impulse.gif"

'Save Chart sheet as Gif file
ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF"

On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss")
.Body = ""
.Attachments.Add Fname
.display 'or use .Display
End With
On Error GoTo 0

Kill Fname
Set OutMail = Nothing
Set OutApp = Nothing
End Sub


CAN you help?







All times are GMT +1. The time now is 10:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com