Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro freezes Excel

Hi all

I wrote some macros to interact and manipulate data in Access from Excel
The macros works fine, but took quite a while to finish the calculation, around 2-3 minutes, and while performing the calculation, Excel freezes
If running that macro only once in a while is no problem.. but it's starting to get irritating if everytime you run the macro, you need to wait for 3 minutes before you can get back to the Excel file again

My question is
Is there any way to tell Excel to run the macro in the background so that I can still work on my Excel file while Excel is doing the calculation

Regards
Yohan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Macro freezes Excel

You have already asked this question 2 hours ago!

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Yohan" wrote in message
...
Hi all!

I wrote some macros to interact and manipulate data in Access from Excel.
The macros works fine, but took quite a while to finish the calculation,

around 2-3 minutes, and while performing the calculation, Excel freezes.
If running that macro only once in a while is no problem.. but it's

starting to get irritating if everytime you run the macro, you need to wait
for 3 minutes before you can get back to the Excel file again.

My question is:
Is there any way to tell Excel to run the macro in the background so that

I can still work on my Excel file while Excel is doing the calculation?

Regards,
Yohan



  #3   Report Post  
Posted to microsoft.public.excel.programming
mb mb is offline
external usenet poster
 
Posts: 4
Default Macro freezes Excel

Yes and No.
Yes: You can use the Win32 API to create a worker thread.
No: No native VBA support for this.
Marc


"Yohan" wrote in message
...
Hi all!

I wrote some macros to interact and manipulate data in Access from Excel.
The macros works fine, but took quite a while to finish the calculation,

around 2-3 minutes, and while performing the calculation, Excel freezes.
If running that macro only once in a while is no problem.. but it's

starting to get irritating if everytime you run the macro, you need to wait
for 3 minutes before you can get back to the Excel file again.

My question is:
Is there any way to tell Excel to run the macro in the background so that

I can still work on my Excel file while Excel is doing the calculation?

Regards,
Yohan



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Macro freezes Excel

You can create a worker thread in VBA using APIs? I've only seen this
done using MFCs in C++. Please post some exmaple code.

--

"mb" wrote in message ...
Yes and No.
Yes: You can use the Win32 API to create a worker thread.


"Yohan" wrote in message
...


My question is:
Is there any way to tell Excel to run the macro in the background so that

I can still work on my Excel file while Excel is doing the calculation?

  #5   Report Post  
Posted to microsoft.public.excel.programming
mb mb is offline
external usenet poster
 
Posts: 4
Default Macro freezes Excel

I Indeed doubt if it is possible to create a worker thread in VBA. What I
have done before is fire events from a thread in an ActiveX control. In this
way you can e.g. open a form and run some background code on interval base.

You are right, not a true worker thread.

Marc




"jamieuk" wrote in message
om...
You can create a worker thread in VBA using APIs? I've only seen this
done using MFCs in C++. Please post some exmaple code.

--

"mb" wrote in message

...
Yes and No.
Yes: You can use the Win32 API to create a worker thread.


"Yohan" wrote in message
...


My question is:
Is there any way to tell Excel to run the macro in the background so

that
I can still work on my Excel file while Excel is doing the calculation?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs Rruffpaw Setting up and Configuration of Excel 1 September 17th 11 01:25 PM
Excel Macro runs fine, but freezes if I try to do ANYTHING else whileit's running Rruffpaw Setting up and Configuration of Excel 0 August 3rd 11 08:31 PM
Excel freezes lt Excel Discussion (Misc queries) 1 November 5th 06 09:31 PM
Macro freezes spreadsheet davemel Excel Discussion (Misc queries) 0 August 1st 06 08:26 AM
Macro freezes after using Filters. davemel Excel Discussion (Misc queries) 2 July 31st 06 01:43 PM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"