Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default label.refresh error

I attached a label control in a worksheet.
I change the caption of label by vba. This is my code:

sub refreshLabel()
With Activesheet
.label1.caption= strMsg
.label1.refresh
end with
end sub


But I got run time error says that object doesn't support
laebl.refresh property.

So.. I tried another way. The code is:
sub refreshLabel()
With Activesheet
.label1.caption= strMsg
doevents
end with
end sub

DoEvents not update too.

Why excel behaves for above 2 cases?
Thanks for the help

Cheers

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default label.refresh error

Just remove that line, it is not necessary.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"beerora" wrote in message
ups.com...
I attached a label control in a worksheet.
I change the caption of label by vba. This is my code:

sub refreshLabel()
With Activesheet
.label1.caption= strMsg
.label1.refresh
end with
end sub


But I got run time error says that object doesn't support
laebl.refresh property.

So.. I tried another way. The code is:
sub refreshLabel()
With Activesheet
.label1.caption= strMsg
doevents
end with
end sub

DoEvents not update too.

Why excel behaves for above 2 cases?
Thanks for the help

Cheers



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
excel trendline label error mark Excel Discussion (Misc queries) 2 October 10th 07 08:24 PM
Refresh produces #N/A error RhysPieces Links and Linking in Excel 1 July 11th 07 07:42 PM
On Error GoTo Label in a loop only working once. Ken Johnson Charts and Charting in Excel 4 July 5th 06 09:39 PM
Type Mismatch Error Populating Label ssjody Excel Programming 3 December 22nd 05 12:23 PM
Refresh label on user form with RefEdit John Tjia Excel Programming 2 January 6th 04 10:12 PM


All times are GMT +1. The time now is 04:19 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"