Link to home
Start Free TrialLog in
Avatar of tlfeet
tlfeet

asked on

Display info/data as Macro runs

In VBA with Excel
Have a macro
It loops thru some cells (hundreds)
Would like to have msgbox/userform or whatever, display some values as it processes the data (w/o user having to press OK, or close the window each time - a status window, if you will)
To simplify the q, I want to have it display something like this "Processing Row Number: RowNo"
Where "RowNo" is the number (integer) of the row it is currently processing.

For RowNo = FirstRow To LastRow
'display a message saying "Processing Row Number: RowNo"
Next RowNo

Tried using MsgBox & UserForm but have to press OK or close window each time (hundreds)
Just want it to display the info and move on.
Avatar of Dave
Dave
Flag of Australia image


Dont use a MsgBox

Use a userform with a label (named Label1 below) such as

Private Sub UserForm_Initialize()
For RowNo = FirstRow To LastRow
Label1 = "Processing Row Number: " & RowNo
DoEvents
Next RowNo
End Sub

Cheers

Dave
Avatar of tlfeet
tlfeet

ASKER

Hi Dave,
Tried UserForm
Have to close the form/window for each row.
i.e. Instead of clicking on "OK" in a Msg Box for each row [not good], have to close the UserForm window for each row...also not good.
Want to data/info to display for each row, w/o "close window each time (hundreds)"
ASKER CERTIFIED SOLUTION
Avatar of Dave
Dave
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tlfeet

ASKER

Hi Dave,

Thanks, exactly what I was looking for.
I knew it was something relatively simple.
:-)

Thanks again
No problem tlfleet :)

although I'm a little curious why you gave me a "B". I dont usually comment on grades as its part of the game but you seemed pretty happy with the outcome of this one

Cheers

Dave
Avatar of tlfeet

ASKER

Tokk you 2 tries. ;-)
LOL :)
Avatar of tlfeet

ASKER

Shoot, hit submit before I was done.
Misspelled "Took"
Wanted to add: did not know what to put (nor how many points to offer).
if its a B for two tries then at this rate I'll be getting Z's on some of my answers..........:)

Points and graded are both awarded at your discretion,  I've never seen an expert argue about points as it is set when they go in, but many don't like "B"s let alone "C"'s. I'm fine with B's myself (although I've never given one) as answers are sometimes partial, badly worded or too short.

But I think you might be getting some sharp words if you give B's for solutions you are obviously happy with.

Happy asking

Cheers

Dave
tlfeet:

It's very difficult to get answers right the first time, particularly in code. Some people are answering your questions during lag time at their full-time jobs, or are just anxious to get you an answer...

From what I can see, you got a VBA solution in less than 2 hours. Regardless of the number of tries, I call that pretty darn good.
:)

The grade you give in no way affects the QUESTION points you pay, but DOES affect the EXPERT points received by the expert.

If you'd like to change that grade to "A", you can make that request at community support. Just click on the CS link at the top of the page.

~Dreamboat
Denmother and Protector of all Experts
LOL!
Avatar of tlfeet

ASKER

Hey Dave,
Followed Dreamboat's suggestion and asked CS to change the grade to an A.

Sorry about that.
LOL, tlfeet.

That's YOUR job.
Hi tlfeet

No problem, thanks for the upgrade

Thanks for the post Dreamboat

Cheers

Dave