473,668 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to turn Excel Delete Warning off

Bob
In the following code, when the DELETE line is executed I get a dialog asking if I want to delete or to cancel. How do I turn it off? Also when the first CLOSE line is executed, the application so to sleep.

Dim strTabName = Path.GetFileNam eWithoutExtensi on(strSourceWor kBookName)
Dim wbSOURCE As Excel.Workbook
Dim wbTARGET As Excel.Workbook

With appExcel
wbSOURCE = .Workbooks.Open (strSourceWorkB ookName)
wbTARGET = .Workbooks.Open (strTargetWorkB ookName)
wbTARGET.Sheets (strTabName).se lect()
wbTARGET.Active Sheet.delete()
wbTARGET.Close( True)
wbSOURCE.Close( )
.Quit()
End With

Nov 20 '05 #1
2 3331
Bob,

This is using Office programming in a Net wrapper. It is interopp. For this
kind of questions you get probably a better or more answers in a real office
developer newsgroup..

microsoft.publi c.office.develo per*

There are a lot.

I hope this helps?

Cor
Nov 20 '05 #2
* =?Utf-8?B?Qm9i?= <Bo*@discussion s.microsoft.com > scripsit:
In the following code, when the DELETE line is executed I get a dialog
asking if I want to delete or to cancel. How do I turn it off? Also
when the first CLOSE line is executed, the application so to sleep.
Dim strTabName = Path.GetFileNam eWithoutExtensi on(strSourceWor kBookName)
Dim wbSOURCE As Excel.Workbook
Dim wbTARGET As Excel.Workbook

With appExcel
wbSOURCE = .Workbooks.Open (strSourceWorkB ookName)
wbTARGET = .Workbooks.Open (strTargetWorkB ookName)
wbTARGET.Sheets (strTabName).se lect()
wbTARGET.Active Sheet.delete()
wbTARGET.Close( True)
wbSOURCE.Close( )
.Quit()
End With


\\\
With Application
.DisplayAlerts = False
ThisWorkbook.Sa veAs("D:\file.x ls")
.DisplayAlerts = True
End With
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #3

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

Similar topics

1
11040
by: Dan | last post by:
Hello, I am trying to read and write to an Excel file via my Java applet. I have done so successfully on several simple Excel files that simply had data cells without many complicated equations or any other Excel extras. However, now is the time to get the complicated ones to work. I didn't think that there would be a difference, but there is. At first, I was beginning to think that it was a file size problem, but now I am unsure. ...
13
35524
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy utility from my PythonWin (IDE from ActiveSTate),
4
10094
by: Rich Wallace | last post by:
Is there a way to open an Excel file and either respond to or supress the Macro warning window via VB.NET? Dim oExcel As Excel.Workbook Dim sFilePath As String = "C:\DailyReport.xls" oExcel = GetObject(sFilePath) --> Throws Macro warning window oExcel.Unprotect("password")
8
788
by: Sam | last post by:
Hi All, I posted this message few days ago. No one has answered so far. I just would like to know if it is possible to do or not. Even if you can not tell me how to do this, maybe you know which library I need to use in order to access excel information from a VB.NET code. For example, I would be interested by knowing how to access a simple cell value in an excel file from a vb.net code. Here is the mail I sent last week, but as I...
3
15273
by: Rene | last post by:
Hi Proggies, i try to delete an excel worksheet but nothing happens (work on vb.net 2005) ..... xlSheet = xlApp.Sheets("Master") xlSheet.select xlSheet.delete also try
7
11192
by: Eran.Yasso | last post by:
Hi, I have project that automate excel(using Excel COM) which works fine in my home. I took the project from my home to work and tried to build the project but it won't built. I get error "The type or namespace name 'Excel' could not be found". the error points to line in my code: "public Excel.Application ExcelObj = null".
3
20256
by: colmkav | last post by:
Anyone know how to do the equivalent in Access VBA to: Application.DisplayAlerts = false (as you do in VBA Excel) For some reason after I do compact on my db Access starts displaying all the warning messages when you delete rows etc in the code. Colm.
3
5719
LacrosseB0ss
by: LacrosseB0ss | last post by:
Quick question: is there a way to programmatically turn off the warning message for macros in Excel? (Macros can be harmful ... enable/disable) The reason for the question is on our intranet page we have a link to an HR document a lot of people use. However, this document runs macros. We would like to, if possible, have the message NOT be displayed. It has been confusing some users as they don't know it's an Excel doc. Nor do they really know...
0
2705
by: jwmaiden | last post by:
Have an application that opens up a webbrowser control to display data in an Excel spreadsheet (using VB.NET in VS 2005). No problem with opening the spreadsheet or displaying the data, but I'm having problems with repeating the process. I want to create an Excel spreadsheet, add some data to it, and display the results in a webbrowser control. I want to be able to then later delete the old Excel spreadsheet, create a new one, add some new data,...
0
8367
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8790
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2781
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.