LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default trouble with commandbarbutton.state

Can anyone tell me why the following code does not change the button state?
Sub component_EOP()

Dim comp_rng As Range
Dim comp_list_end As Long
Dim comp_con As CommandBarButton

Set comp_rng =
Workbooks("reports.xls").Worksheets("Components"). Range("d1:d65535")
Set comp_con = CommandBars("End of list").Controls("component_EOP")

comp_con.FaceId = 82

comp_list_end = Application.WorksheetFunction.CountA(comp_rng)

Workbooks("reports.xls").Worksheets("Components"). Activate

If ActiveWindow.ScrollRow = 1 Then
ActiveWindow.ScrollRow = comp_list_end - 10
comp_con.state = msoButtonDown
Else
ActiveWindow.ScrollRow = 1
comp_con.state = msoButtonUp
End If


End Sub
 
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
replace state names with state code abbreviations se7098 Excel Worksheet Functions 3 July 25th 09 06:41 PM
How can I show state-by-state data (as silos) on a map of NA Rob Charts and Charting in Excel 0 November 5th 07 03:41 PM
Converting State Names to State Abbreviations aznate Excel Discussion (Misc queries) 1 October 20th 06 06:52 AM
Self deleting CommandBarButton possible? Bruno G. Excel Programming 2 January 11th 05 12:13 PM
CommandBarButton.FaceId=? Tom Ogilvy Excel Programming 1 September 17th 03 05:28 PM


All times are GMT +1. The time now is 06:49 AM.

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

About Us

"It's about Microsoft Excel"