Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

prompt user for 'save as' when exporting owc chart to gif

Status
Not open for further replies.

sazmeise

Programmer
Apr 28, 2004
5
GB
I have a method which works perfectly fine to export office web charts to gif and save them on the c drive or a drive which i allow the user to specify.

i am NOW being told that this isn't good enough and i need a 'save as' dialog box to pop up to browse through the users directory so they can choose teh location..

Can't find any information on this on the net. Any ideas?

Badly stuck
Saz
***
<code>
This method i have so far is as follows:
Sub export()
On Error Resume Next

answer = MsgBox("Would you like the image saved on your C drive? "&vbcrlf&"Click ""No"" to specify location",3)

If not Err then

if( answer = 7) then
typed_location = InputBox("Enter location of file e.g. H:/ Default is C:/ ")
if(typed_location <> "") then
picturename = typed_location & "faultPrsChart"&Day(Date)&"_"&Month(Date)&"_"&Year(date)&".gif"
ChartSpace1.ExportPicture picturename, "gif", 600, 350
if Err = 0 then
window.open(picturename)
end if
end if
elseif answer = 6 then
picturename = "C:\faultPrsChart"&Day(Date)&"_"&Month(Date)&"_"&Year(date)&".gif"
'alert( Err )
ChartSpace1.ExportPicture picturename, "gif", 600, 350
if Err = 0 then
window.open(picturename)
end if
end if
end if
End Sub
</code>
 
u may want to see showModalDialogBox, it opens a popup there maybe u can give a file input and ask the user to select a file (as a directory cannot be selected), thats as close as i can get...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top