473,399 Members | 3,603 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,399 software developers and data experts.

Data not going into Excel from Form button - Do I need a thread

JM
Hi

I have created a Windows Form that takes input. When the Run button is
pressed the form is disabled and the code checks some files and inputs the
data into an Excel worksheet (that is hidden so that I cannot watch as it
gets filled up). When it is done it saves the Excel file.

I find that if I go into another program while it's trying to work on the
Excel spreadsheet that not all of the data appears (missing data!). If I
click the Run button and then do nothing (don't touch the keyboard) all of
the data appears in the spreadsheet no problem.

What the heck am I missing??? I don't have the Minimize and Maximize
buttons on the Windows Form but that should not make a difference right? Do
I need to make a thread or something?
Nov 17 '05 #1
2 1791
> I find that if I go into another program while it's trying to work on the
Excel spreadsheet that not all of the data appears (missing data!). If I
click the Run button and then do nothing (don't touch the keyboard) all of
the data appears in the spreadsheet no problem.
Are you using another program to access the Excel spreadsheet as your
program is writing information to it? If this is the case there is probably
a lock on the file by one of the applications; most likely your app is not
locking the file and when Excel opens it will lock it and no further data
can be written to it your program should error out. Is your program
crashing or reporting any errors?

"JM" <JM@discussions.microsoft.com> wrote in message
news:B1**********************************@microsof t.com... Hi

I have created a Windows Form that takes input. When the Run button is
pressed the form is disabled and the code checks some files and inputs the
data into an Excel worksheet (that is hidden so that I cannot watch as it
gets filled up). When it is done it saves the Excel file.

I find that if I go into another program while it's trying to work on the
Excel spreadsheet that not all of the data appears (missing data!). If I
click the Run button and then do nothing (don't touch the keyboard) all of
the data appears in the spreadsheet no problem.

What the heck am I missing??? I don't have the Minimize and Maximize
buttons on the Windows Form but that should not make a difference right?
Do
I need to make a thread or something?

Nov 17 '05 #2
JM
If I don't touch the computer while it is processing it works fine. Once I
start to work with other programs it starts to drop the data from Excel. No
Errors or anything. I just think that when I do other work on the computer
the Excel workbook no longer has the focus.

"Alex Passos" wrote:
I find that if I go into another program while it's trying to work on the
Excel spreadsheet that not all of the data appears (missing data!). If I
click the Run button and then do nothing (don't touch the keyboard) all of
the data appears in the spreadsheet no problem.


Are you using another program to access the Excel spreadsheet as your
program is writing information to it? If this is the case there is probably
a lock on the file by one of the applications; most likely your app is not
locking the file and when Excel opens it will lock it and no further data
can be written to it your program should error out. Is your program
crashing or reporting any errors?

"JM" <JM@discussions.microsoft.com> wrote in message
news:B1**********************************@microsof t.com...
Hi

I have created a Windows Form that takes input. When the Run button is
pressed the form is disabled and the code checks some files and inputs the
data into an Excel worksheet (that is hidden so that I cannot watch as it
gets filled up). When it is done it saves the Excel file.

I find that if I go into another program while it's trying to work on the
Excel spreadsheet that not all of the data appears (missing data!). If I
click the Run button and then do nothing (don't touch the keyboard) all of
the data appears in the spreadsheet no problem.

What the heck am I missing??? I don't have the Minimize and Maximize
buttons on the Windows Form but that should not make a difference right?
Do
I need to make a thread or something?


Nov 17 '05 #3

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

Similar topics

4
by: Martin | last post by:
There is an Access table on the network. 15 users who do not have Access are connected to the network. Is there a way for each user to be able to enter one or more rows containing 3 or 4 columns to...
8
by: Colleyville Alan | last post by:
I have been working on an Access app that takes info from a file and writes it to a spreadsheet on a form, simultaneously saving the spreadsheet to Excel. I got the idea that the same concept...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
9
by: Brian Hanson | last post by:
Hi, I have an unusual problem that just showed its ugly head at a pretty bad time. I have an asp.net (VB) app that takes data from an Excel sheet and puts it into SQL Server. I get the data...
1
by: Brian Conklin | last post by:
Hello Eneryone, I am having a problem. I have written a little app that will take a text "pipe" delimited file and place all of the values in to an Excel spreadsheet. It works great on any of my...
10
by: Doug Bell | last post by:
Hi, I have an application that has a "Data Access Class" and "User Interface Class". It is for receiving Purchase Order data from one system and pushing processed transactions to another...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
7
Merlin1857
by: Merlin1857 | last post by:
Its great producing data for users to look at in your web pages and generally that is sufficient for their needs but sometimes you may want to supply your user with the data in a form they can...
7
by: kpresidente | last post by:
Hello all, I'm trying to transfer the value of a control on an Access form to an Excel worksheet using VBA. The Access form is a single form with all the controls disabled, so that data is "read...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
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...

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.