hello,

i have to open excel file from vb application. i want to update excel file from vb if i modify some value from vb application. but i dont want msg from excel that "Do you want to save changes in this file?"

please guide me

Thnaks n Regards
from
Pranav Varma

Public xlApp As New Excel.Application
Public xlBook As Excel.Workbook
Public xlSheet As Excel.Worksheet
xlApp.Workbooks.OpenText FileName:= "Text.xls"
cells(1,1)= "Test2"
ActiveWorkbook.Close savechanges:=True xlApp.Quit

hello,

i have to open excel file from vb application. i want to update excel file from vb if i modify some value from vb application. but i dont want msg from excel that "Do you want to save changes in this file?"

please guide me

Thnaks n Regards
from
Pranav Varma

Public xlApp As New Excel.Application
Public xlBook As Excel.Workbook
Public xlSheet As Excel.Worksheet
xlApp.Workbooks.OpenText FileName:= "Text.xls"
cells(1,1)= "Test2"
ActiveWorkbook.Close savechanges:=True xlApp.Quit

Public xlApp As New Excel.Application
Public xlBook As Excel.Workbook
Public xlSheet As Excel.Worksheet
xlApp.Workbooks.OpenText FileName:= "Text.xls"
cells(1,1)= "Test2"
ActiveWorkbook.Close savechanges:=True xlApp.Quit

Thnx for this code. This one is really upto the mark.
but still i face one problem in the last line
i.e.

ActiveWorkbook.Close savechanges = true
when i m trying above line, then no changes made in that file
but
ActiveWorkbook.Close savechanges
whn i m trying above line, then changes made, but the msg display that do u want to save changes to this file??

i dont want msg. directly it has to save the file.
if possible, please guid me.

again thanks for this help.:)


Thnx for this code. This one is really upto the mark.
but still i face one problem in the last line
i.e.

ActiveWorkbook.Close savechanges = true
when i m trying above line, then no changes made in that file
but
ActiveWorkbook.Close savechanges
whn i m trying above line, then changes made, but the msg display that do u want to save changes to this file??

i dont want msg. directly it has to save the file.
if possible, please guid me.

again thanks for this help.:)

Replace "ActiveWorkbook.Close savechanges = true "

by
"ActiveWorkbook.save
ActiveWorkbook.Close savechanges:=False"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.