Excel 2002 - Iterations - Find the iteration sequence number
Gocush,
Thx for this, but I think it does not suffice. Your solution only
works when *I* have control of the statusbar, i.e., when I set the
value for it (But if I do that, then I would know what it is normally
;) ).
The show my problem I expanded your solution somewhat:
Sub tst1()
Dim SB As String
Dim i As Integer
Application.DisplayStatusBar = True
Debug.Print "Setting the Statusbar myself:"
Application.StatusBar = "hello"
SB = Application.StatusBar
Debug.Print SB & Application.StatusBar
Debug.Print "Having Excel Control the Statusbar"
Application.StatusBar = False
SB = Application.StatusBar
Debug.Print SB & Application.StatusBar
End Sub
This yields:
Setting the Statusbar myself:
hellohello
Having Excel Control the Statusbar
FALSEFALSE
What I want is to be able to read the actual text in the statusbar
(which with me is "Ready Calculate" but could be "Ready" and during
my UDF will be "Iter: [Iteration sequence number"]
So, either I would like to be able to read the actual text of the
statusbar _or_ have a way to find the actual Iteration Sequence
Number, which is really what I am currently looking for (reading the
statusbar is just a way I thought to try to get it)
Umf
gocush /delete wrote in message ...
Try this to get Statusbar value into a variable then do whatever with the
variable
Dim SB As String
Application.DisplayStatusBar = True
Application.StatusBar = "hello"
SB = Application.StatusBar
MsgBox SB
"Umfriend" wrote:
[SNIP]
QUESTION
Now I can print.debug everthing I want except for one thing: The
iteration sequence number it is currently working on. When it
iterates, the statusbar will show "Iter: ##", and I want to print that
number with the other debug values each time the UDF is called.
Is there a way to do this? I would be satisfied if I could "read" the
text in the statusbar and print that to the Immediate window, but I
have not found a way to do it.
[Geesh, that's a lot of text for a simple query, sry]
|