473,394 Members | 2,100 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,394 software developers and data experts.

Progress Bar in VBA(Excel)

NarenMCA
Hi,

I want to use status bar control 6.0 in VBA(Excel). Other functions in the Macro will be performing some copy/paste and filtering operations. I want the progress bar to show status based on the tasks performed by those functions.

Can any one help me in this.

Thanks in advance,
Naren
Jun 20 '08 #1
4 11021
kadghar
1,295 Expert 1GB
i wouldnt recomend you to use controls other than the default ones. (txtbox, command button, etc)

in this case, i'd use the Excel's status bar to show the progress. Check this little example:

Expand|Select|Wrap|Line Numbers
  1. Sub StsBar()
  2.     Dim t As Single
  3.     t = Timer
  4.     Do
  5.         DoEvents
  6.         Application.StatusBar = Timer - t
  7.     Loop Until Timer > t + 10
  8. End Sub
  9.  
well, hth
Jun 20 '08 #2
i wouldnt recomend you to use controls other than the default ones. (txtbox, command button, etc)

in this case, i'd use the Excel's status bar to show the progress. Check this little example:

Expand|Select|Wrap|Line Numbers
  1. Sub StsBar()
  2.     Dim t As Single
  3.     t = Timer
  4.     Do
  5.         DoEvents
  6.         Application.StatusBar = Timer - t
  7.     Loop Until Timer > t + 10
  8. End Sub
  9.  
well, hth


Thanks for you suggestion.

But I am trying this because I just want to learn this.

-Naren
Jun 20 '08 #3
kadghar
1,295 Expert 1GB
Thanks for you suggestion.

But I am trying this because I just want to learn this.

-Naren
Yeah, well, then go to the Tools menu > Aditional Controls (inside the VBA editor)

there you'll have to add some Microsoft Progress Bar control (and check the library that contains it, so when you run this macro in some others' office, it might tell you that you need an specific library, in that case, you'll have to go to the tools menu > references, and browse the file to add it, in most cases that file is already in most of computers, but just in case, make sure you know where to download it or have a copy in a pen drive)

Once you've added it, it'll be in your tools menu and you can use its method and properties as it were any other control.

HTH
Jun 20 '08 #4
kadghar
1,295 Expert 1GB
And i forgot to say

check te first example i wrote using DoEvents, you may find it useful, just change the control instead of the Excel's statusbar.
Jun 20 '08 #5

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

Similar topics

3
by: info | last post by:
After using clipboard functions in Excel controlled from Access VBA, Excel doesn't quit when I use the following ExcelApp.Quit Set ExcelApp = Nothing If I don't use the clipboard functions in...
0
by: manishdotnet | last post by:
Hi all, We have an Excel VBA solution to generate Excel reports. Macros coded will fetch the data and populate it into Excel templates. Now this solution is to be migrated to a .net Excel...
0
by: Rainman | last post by:
Hi! I'm new here, and I had my first encounter with this site yesterday, when I shamelessly copied Killer42's excellent code for reading a file using the Get method. Thanks! :-) It worked like a...
1
by: amitaglawe | last post by:
I have some requirements inwhich i have used picture box application in VB and now i have to do same application and i am looking for a picture box application in VBA excel which i am not able to...
4
by: Lara1 | last post by:
I'm trying to write a procedure that will enable button on a sheet (and colour it red), but ONLY when changes are made to cells in column E of that sheet (from row 10 to the bottom of the...
0
by: prakashsakthivel | last post by:
Dear Members, I want to write Microsoft Exam for VBA ( Excel,Access, Word). Could you please any member guide me that where i can get details about that. Thanks musai.
7
by: NeverLift | last post by:
This is probably answered elsewhere, but I've searched the Web and VBA for Excel manual, find no answers. I have a VBA-coded macro in an Excel workbook that is to open another existing workbook --...
1
by: dhruvbhatt | last post by:
I am all new for vba excel project. i already have the code ready. I want to have a gui for this. meaning, all macros have been coded for the excel sheet. Now i want to build GUI for which there...
2
by: jayachandramuni | last post by:
Hi Buddy. Good day. i am jaya chandra muni ,i have few excel file with VBA code to achive some functionalty. that was written around few year back 1999. Now i want to convert those VBA code to...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.