User defined functions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

just a quickie - i'm pretty sure the answer is no but I just wanted to get
it confirmed by one of the gurus here - my question is:

can i write messages to the statusbar from a user defined function?

i've tried it and it doesn't seem to do anything, but it doesn't cause an
error either.

TIA
big t
 
Hi everyone,

just a quickie - i'm pretty sure the answer is no but I just wanted to get
it confirmed by one of the gurus here - my question is:

can i write messages to the statusbar from a user defined function?

i've tried it and it doesn't seem to do anything, but it doesn't cause an
error either.

TIA
big t

Yes, you can.

Look at VBA HELP for the StatusBar Property.


Here's a code snippet from one of my routines. In this case, 's' is a double
representing file size:

========================
....
oldStatusBar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Copying File..." & Format(s/1024/1000, "0.00") & "MB"
....
====================


--ron
 
Thanks for the info Ron.

I just wanted to confirm - do you do this from a user defined function? I
copied your code into one of my functions (having changed the text to be
displayed in the statusbar) but I don't get anything in my Statusbar.

Any ideas?

TIA
big t
 
Thanks for the info Ron.

I just wanted to confirm - do you do this from a user defined function? I
copied your code into one of my functions (having changed the text to be
displayed in the statusbar) but I don't get anything in my Statusbar.

Any ideas?

Ah I missed that nuance. No I do not do it from a function; I do it from a
sub.

I believe that a function can only return a value to the cell in which it
exists, and cannot influence other parts of the Excel environment.


--ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top