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: 14
Default specialcells and toolbox button click event

Hello,

I have problems with usage of SpecialCells . What I have is as below
1. 2 Sheets named "Page1" and "Page2"
2. "Page2" contains a "control Toolbox" Button
3. I have the On_Click event macro. This macro does the following
a. On Click the sheet "Page1" is unprotected via code
b. Use the specialcells as Set UsedRangeCol =
Worksheets("Page1").Range("A5:A255").SpecialCells( xlCellTypeConstants)

I encounter a Problem here which is runtime error 1004

I found out that when the Button on "page2" has focus the sheet on which the
button is present has some Toolbars Greyed out (as if in protection). If i
press the button and then when i get the Error I select a Cell (any cell) in
"Page2" and do a single step the error is not present and everything works
fine . However if the Button has focus and i get an error and i do a single
step then the error is still present.

Why so? What should i do to circumvent this problem

Regards,
SSR



 
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
Contol toolbox command button eye59 Excel Discussion (Misc queries) 2 January 2nd 07 02:21 PM
On click button event [email protected] Excel Worksheet Functions 1 November 30th 06 04:39 PM
Control Toolbox button PBS Excel Discussion (Misc queries) 1 March 21st 06 11:39 PM
Control toolbox Buttons disappear on click Mangesh Yadav Excel Discussion (Misc queries) 2 September 16th 05 05:38 AM
Control Toolbox button david Excel Programming 0 August 5th 03 05:28 PM


All times are GMT +1. The time now is 04:19 AM.

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"