473,465 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to resolve a problem in excel when it opens

chandru8
145 New Member
Hi to all

I had a problem in excel file..,

I am generating a new excel file through vb6.0 and i can access data from that excel.

if user opens another excel file and closes my excel file also closed how to resolve this problem.

can any one help me on this

thank you for all in advance.
May 23 '08 #1
3 1307
kadghar
1,295 Recognized Expert Top Contributor
Hi to all

I had a problem in excel file..,

I am generating a new excel file through vb6.0 and i can access data from that excel.

if user opens another excel file and closes my excel file also closed how to resolve this problem.

can any one help me on this

thank you for all in advance.
open your excel file in a new object (excel application) and set its visible=false. this way, user wont be able to close it.
May 26 '08 #2
prakashsakthivel
57 New Member
open your excel file in a new object (excel application) and set its visible=false. this way, user wont be able to close it.

Hi,

We have to use API function when we handle multiple instance of excel application. If you don't have any idea about this I will post code.


musai.
Jun 3 '08 #3
kadghar
1,295 Recognized Expert Top Contributor
Hi,

We have to use API function when we handle multiple instance of excel application. If you don't have any idea about this I will post code.


musai.
Dear sir,

As long as i understood chandru's question, he should be using something like this to open an Excel's instance, and using its data:

Expand|Select|Wrap|Line Numbers
  1. dim Obj1 as object
  2. set obj1 = createobject("excel.application")
  3. obj1.visible = true 
  4. obj1.workbooks.open ("c:\myBook.xls")
  5. msgbox obj1.cells(1,1)
(that might have something to do with API's)

But chandru's problem (as i understood it) is that this new excel's instance (obj1) can be used during runtime by the user (since its visible). So if the user closes this Excel's Application instance. Any further code that references Obj1 will cause an error. The easier solution i can think of, is leaving this instance invisible for the user, so he'she cannot close it that easily.

But then again, sometimes i missunderstand the questions, and give solutions that have nothing to do with the subject.

Kad
Jun 3 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: mytfein | last post by:
Hi Everyone, Background: Another department intends to ftp a .txt file from the mainframe, for me to process. The objective is to write a vb script that would be scheduled to run daily to...
0
by: Jack | last post by:
Windows 2K Pro Access/Excel 2003 Hi there, I have a large number of password protected Excel Workbooks. The files are protected by code that runs when the workbook opens. The code asks the...
0
by: Ramjee Tanguturi | last post by:
Hi, I face this peculiar problem. I have an export to excel functionality in my ASP.NET application. I set the Response.ContentType and Content Disposition properties of the page as ...
6
by: Michael Groeger | last post by:
Hi, I have an aspx page which generates an excel document and transfers it to the browser as attachment. Normally, once the document is transferred the open save dialog prompts to open or save...
4
by: Eric W | last post by:
I am converting an EXCEL VBA application to Visual Basic (2003). I am not having much luck finding how to convert statements containing references to things like ThisWorkbook.Sheets("sheetname")....
2
by: Mad Scientist Jr | last post by:
>From an asp.net web page I want the user to open the results of a SQL query in Excel, as automatically as possible (ie not having to loop through columns, rows, in code). For this,...
1
by: psuaudi | last post by:
I’m using a vb.net app that opens a powerpoint presentation and calls the updatelinks function of powerpoint. One slide in the presentation is linked to a cell range in an excel file, and the...
0
by: mustaqueahmad | last post by:
Hi All, I am getting export to excel problem when I am giving IPAddress in URL, but it is working correct when am giving localhost and page name. eg : when I am writing My machine IP...
4
by: zeeta999 | last post by:
Ho I need help. I am running a piece of code which opens a spreadsheet deletes one of the worksheets and then saves it. My problem is that although the spreadsheet opens and I can delete the sheet...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...
0
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...

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.