Visual Basic for Applications (VBA)


Multithreading forms COM class


Hi there, I have a class library project in vb.net which accesses the API of some engineering software (RSA), gives/takes information and performs some calculations on a large amount of data. I use excel/vba as the user interface as I need to read/write information from a workbook. i.e. from VBA Dim RFunctions as new RobotFunctions RFunctions.PerformCalculations ... and bring some data into excel etc While the calculations are going on I want to display a form that shows progress on a progress bar and in a listbox. from within the classlibrary, create a new form and use functions "AddtoListbox" and "UpdateProgress" within the form class Dim MyForm as new ProgressForm MyForm.AddtoListbox("Status") MyForm.UpdateProgress(increment) To keep the form functional while the calculations are going on I think I need to display this form on a new thread as excel and the form appear to be locked up and it is not possible to click on the form or do anything in excel. How would i create an instance of the form in a new thread (seperate from the calculation thread) from within the RobotFunctions class? There is a lot of information around on how to create a new thread to perform background tasks on a form on threads, however i havent found anything on doing this the other way around. Also is it possible to run PeformCalculations on a seperate thread to excel so that it is possible to do other things in excel while the calculations are happening? Thanks LT
LT,i don't believe there is any threading abilities in vba. i have seen it suggested that vba might be able to use other threads in some manner but as far as i understand, vba is single thread only. you may have to look at some other options outside excel. how to accomplish it inside excel is not something i have any knowledge of.
FREE
DEVELOPER
TOOLS CODE PROJECTS
DATABASE CODE GENERATOR
DATABASE / GENERAL APPLICATION TUTORIAL
Upload Projects to share or get help on and post the
generated links here in the forum
www.srsoft.us
Hello,I agree with Jeff, for more information you could refer to this early post:http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/735c8f26-2129-4b46-8c1a-aad385cab2ed/If you need perform some task with multithreading you could consider VSTO instead.Thanks.Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Hi
I am moving this thread from the "Windows Forms General " forum to the "Visual Basic for Applications (VBA)" forum, since the issue is related to "Visual Basic for Applications (VBA)". There are more "Visual Basic for Applications (VBA)" experts in the "Visual Basic for Applications (VBA)" forum.
Aland LiPlease mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
LT,i don't believe there is any threading abilities in vba. i have seen it suggested that vba might be able to use other threads in some manner but as far as i understand, vba is single thread only. you may have to look at some other options outside excel. how to accomplish it inside excel is not something i have any knowledge of.
FREE
DEVELOPER
TOOLS CODE PROJECTS
DATABASE CODE GENERATOR
DATABASE / GENERAL APPLICATION TUTORIAL
Upload Projects to share or get help on and post the
generated links here in the forum
www.srsoft.us
Hello,I agree with Jeff, for more information you could refer to this early post:http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/735c8f26-2129-4b46-8c1a-aad385cab2ed/If you need perform some task with multithreading you could consider VSTO instead.Thanks.Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Related Links

Reading data from Notepad and writing into a table in Access
VBA code for saving a ppt working in debug mode,not in real run
VBA Move Paragraphs in Document Using XL
Method range of object_Worksheet failed???
Adding text labels to points on a chart.
Is it possible to set project references at run-time?
Using a condition of =H1<H2 or =H1>H2, How to format H1 instead of H2?
Conditionally formatting a looped range of cells based on value in other cell in VBA
How to get the List of Visible Items from a Pivot Field using VBA
How to run a macro when a Filter is applied on Particular Pivot Field
Add a new property to an existing object
How to Allocate Input Numeric digit to Concerned Numeric header Column
Range referencing in Copy and Paste Formats
VBA6 trouble in WINDOWS 10
VBA dynamic formula reference
Printing Userform

Categories

MSDN
Using Forums
Visual Studio Development
Windows Phone Development
Visual Studio Team Fou...
DevLabs
Data Platform Developm...
JScript and Scripting
Machine Translation an...
Smart Device Development
Microsoft Research
Samsung PC
Office Live Development
Unified Communications
Expression
Archived Forums X-Z
Windows Phone Preview ...
Archived Forums
Internet of Things
Skype for Business
Maps In Windows
Announcements for all ...
Visual C#
Visual F#
Visual Studio Tools fo...
Tools for Apache Cordova
Visual Studio Graphics...
Publishing Windows Sto...
Promote Your App
App & Ad Unit Management
Developing Windows Des...
Windows Desktop Develo...
Windows Desktop Pro-Au...
Windows Hardware Testi...
General Office Develop...
SharePoint 2010 - Deve...
Cloud Services (Web an...
Azure SQL Database
Azure Management Portal
Azure Networking (DNS,...
Azure Backup
Azure HDInsight
Azure API Management
Azure Scripting and Co...
Azure Data Factory
StorSimple
Azure Data Catalog
Azure DevTest Labs
Azure IoT Hub
Azure Blockchain
Windows Presentation F...
Windows Workflow Found...
Claims based access pl...
Team Foundation Server...
Visual FoxPro General
Commerce Server 2007
Code Contracts
Debugger Canvas
Internet Explorer Web ...
.NET Framework inside ...
SQL Server Data Access
SQL Server Replication
SQL Server Security
SQL Server Migration
Power Pivot
Windows Embedded Compa...
SQL Server 2012 High A...
SQL Server 2012 Databa...
Windows Live Messenger...
Windows Live ID: Devel...
MSDN, TechNet and Expr...
MSDN Magazine
Microsoft Automatic Gr...
Office Live Basics, Es...
Open Specifications Qu...
Windows File Sharing P...
Office Protocols
Visio General Question...
Project Server General...
Microsoft Unified Comm...
Microsoft Lync Persist...
Managed Extensibility ...
Expression Web and Sup...
Reference Source Serve...
Windows Performance To...
Retired SharePoint Soc...
Retired SharePoint Col...
Commerce Server 2002 a...
Dynamic Languages on .NET
Game Technologies: Gen...
General Troubleshootin...
LINQ Project General
LINQ to SQL (Pre-Release)
LightSwitch HTML Clien...
Monitor, Alert and Aut...
Office Live Small Busi...
Parallel Computing Gen...
Performance Counters f...
Popfly Explorer
Search Server: Develop...
Server Core Developers
Silverlight (formerly ...
Software Transactional...
SQL Azure Labs Support
SQL Creation
SQL Server 2014 Self-S...
SQL Server 2014 In-Mem...
Visual Basic Power Packs
Visual C++ Express 200...
Visual Studio Database...
Visual Studio Performa...
Visual Studio Team Sys...
Visual Studio UI Autom...
Windows Live Controls ...
Windows Phone Preview ...
Azure N-Series Virtual...
Maps In Windows - APIs
Windows Containers
Microsoft R Open

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile