Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Excel - Range.Hidden property

Posted on 2001-07-30
6
796 Views
Last Modified: 2013-11-25
Hello,
I have got a problem with use of Range.Hidden property:
I put the ActiveX CheckBox on my sheet and assigned following procedure:

Private Sub CheckBox1_Click()
    Columns(10).Value = "Abracadabra"
    Columns(10).Hidden = True    
End Sub

The first line is OK (All fields in the Column No.10 are filled with "Abracadabra") whereas the second one fail (Error 1004).

Note that if I put these two lines for instance in Worksheet_Change event, everything is OK.

Regards,
Vladimir
0
Comment
Question by:vnej4304
  • 4
  • 2
6 Comments
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6334140
This will help:
Private Sub CheckBox1_Click()
   Columns(1).Value = "Abracadabra"
   Application.ActiveCell.Select
   Columns(1).Hidden = True
End Sub

You must set the focus to the excel sheet back from
the checkbox ..
0
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6334170
You must reset the focus from the ActiveX  Checkbox
to the Excel Worksheet object.

This is probably an old excel bug ...

(This error irritates me really long)
WoK
0
 
LVL 4

Accepted Solution

by:
WolfgangKoenig earned 300 total points
ID: 6334196
Beside there exists more errors with ole objects in Excel.
For instance when you embed an command button to the worksheet an then adjust your screen resolution, then it can happen that the behavior of the buttons are crazy. They will resize their font and size randomly ...

More complex an application more bugs they have.

WoK
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:vnej4304
ID: 6334220
Thank you VERY much for your quick and comprehensive answer.
Have a great day!
Vladimir Nejedly
0
 

Author Comment

by:vnej4304
ID: 6334224
Thank you VERY much for your quick and comprehensive answer.
Have a great day!
Vladimir Nejedly
0
 
LVL 4

Expert Comment

by:WolfgangKoenig
ID: 6334230
Best regards;o)
WoK
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA: perform index match based on config sheet with two additional parameters. 9 64
VBA filters 2 66
Copy a row 12 64
using web browser with BING 40 132
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question