473,382 Members | 1,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

SaveAs

Hello,
How to overwrite an existing file without asking the user if he wants to
overwrite it or not?

Hayman
Nov 20 '05 #1
5 14433
Hi Hayman

I just want to state a possible interpretation of your query - judging from
the other two questions of yours

|| I was wondering if there is a way to send
|| an excel sheet as an attached
|| file without sending this file to outlook

and

|| I'd like to insert a jpg file in an excel sheet
|| Can you help me please in that?

I'm guessing that you mean

Q: How do I get Excel to save and overwrite an existing file without asking
the user if he wants to
overwrite it or not?

[I'm leaving the answering to the others. :-)]

Regards,
Fergus
Nov 20 '05 #2
Cor
I think the English from Fergus too, never doubt of that, I thought he lives
in Oxford England.
Nov 20 '05 #3
Hello,

"Fergus Cooney" <fi******@tesco.net> schrieb:
I just want to state a possible interpretation of your query
- judging from the other two questions of yours

|| I was wondering if there is a way to send
|| an excel sheet as an attached
|| file without sending this file to outlook

and

|| I'd like to insert a jpg file in an excel sheet
|| Can you help me please in that?

I'm guessing that you mean

Q: How do I get Excel to save and overwrite an existing file without
asking the user if he wants to overwrite it or not?


A: Ask in the Excel ng:

news://news.microsoft.com/microsoft....el.programming

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 20 '05 #4
Hello,

"Hayman" <ha****@boozallen.com> schrieb:
How to overwrite an existing file without asking the user if he wants to
overwrite it or not?


\\\
Dim o As SaveFileDialog
o.OverwritePrompt = False
If o.ShowDialog(Me) = DialogResult.OK Then
...
Else
...
End If
///

HTH,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet
Nov 20 '05 #5
Thank you so much Ken
This really worked, your help is appreciated
Hayman

"Ken Tucker" <vb***@bellsouth.net> wrote in message
news:eJ**************@TK2MSFTNGP12.phx.gbl...
Hi,

Set the excel.application variable displayalerts property to false. Here is a link on how to automate excel
http://support.microsoft.com/default...b;en-us;301982.

Dim oXL As Excel.Application

Dim oWB As Excel.Workbook

Dim oSheet As Excel.Worksheet

Dim oRng As Excel.Range

' Start Excel and get Application object.

oXL = CreateObject("Excel.Application")

oXL.Visible = True

' your code to automate excel goes here

oXL.DisplayAlerts = False

oSheet.SaveAs("C:\Test.xls",
FileFormat:=Excel.XlFileFormat.xlXMLSpreadsheet)

oSheet = Nothing

oWB = Nothing

oXL.Quit()

oXL = Nothing

Ken
-------------------
"Hayman" <ha****@boozallen.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
Hello,
How to overwrite an existing file without asking the user if he wants to
overwrite it or not?

Hayman


Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: TOM | last post by:
I want to saveas silently ! it will not prompt to user for saveas please tell me how can I do this silently. please do replay ! OLEObject IE IE = CREATE OLEObject
3
by: lir | last post by:
Hi, I am trying to save a fram in a page using the execCommand("saveas") the html is save currectly but I can not save the gif on that page. How can I save the fram with the gif via...
1
by: Jeff | last post by:
I am using the HttpPostedFile to allow users to upload files to a server farm. The SaveAs() saves to a shared network path (\\SERVER\SHARE) so that no matter which web server is taking the...
5
by: Reddy | last post by:
System.Web.UI.HtmlControls.HtmlInputFile.SaveAs(FileName) is not overwriting the file. It used to work fine on IIS5.1 Recently we migrated to IIS6.0. Since then it's not working. If it's new file...
2
by: psanjay | last post by:
Hi, Am unable to open javascript SaveAs dialog box in Firefox browser. Following is the script, <a href="javascript:void(0);" onclick="document.execCommand('SaveAs',false,'*.xyz');">Save this...
2
by: Lance Hoffmeyer | last post by:
Hey all, As always, thanks in advance! I am trying to save a ppt presentation but am having problems regarding spaces and am wondering if I am doing something wrong or whether this is a bug?...
0
by: Bitula | last post by:
Hi, I have a problem with powerpoints saveas during automation. I'm using ppt app to save several ppts to html and to gif. Despite using the app from separate threads (in MTA) looking at my log it...
3
by: =?Utf-8?B?Um9k?= | last post by:
The applicacion sends me the next message "Method not found: Excel._Worksheet.SaveAs (..." I thinks that its about permissions but I do not know how to fix it. I have the same source in two...
0
by: KUVU | last post by:
I am automating an excel report using C#.net.For this i am using a template (.xlt) my code is exceuting perfectly on localcomputer but when i tried on server(windows server 2003) it is not exceuting...
1
by: Repairman2003 | last post by:
I'm using <a href="javascript:document.execCommand('SaveAs', true, 'folder/file.ext')but it always returns false no matter what because of the fact that I'm trying to save a file that isn't in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.