Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default User defined functions

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default User defined functions

On Tue, 28 Sep 2004 08:19:07 -0700, "big t"
wrote:

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default User defined functions

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


"Ron Rosenfeld" wrote:

On Tue, 28 Sep 2004 08:19:07 -0700, "big t"
wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default User defined functions

On Wed, 29 Sep 2004 01:09:03 -0700, "big t"
wrote:

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User defined functions without using VBA. [email protected] Excel Worksheet Functions 0 June 13th 06 05:49 PM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM
User Defined Functions KMcNelson Excel Programming 4 February 23rd 04 09:09 PM
User Defined Functions Ron Bishop[_2_] Excel Programming 0 November 20th 03 04:20 PM
User Defined Functions Tom Waters Excel Programming 1 July 21st 03 12:00 PM


All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"