Re: Excel: Help With A Simple Macro

  • From: Christopher Edwards <edwardsc2007@xxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 25 Aug 2009 21:32:34 +0100

Hi Jim,

I am very sorry, I sent my message in too much of a hurry. What you need is simply what I think you ment it said in your message. Either:

   Selection.EntireRow.Hidden = True
or
   Selection.EntireColumn.Hidden = True

I think I must have misread your original mesage because when I recorded a macro to do what you wanted it only inserted the code above and no fixed value.

I am sure you will find macros and VBA very useful. The more you experiment with them the more powerful you realise they are and you can do all sorts of things you would not think of using a spreadsheet for. For example, in the dim and distant past I even used Excel to convert files from one format to another and that was before VBA came along. I agree that this was not the best solution but it was needed quickly and I would probably have taken longer with another language.

Good luck,

Chris





----- Original Message ----- From: "Homme, James" <james.homme@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, August 25, 2009 5:33 PM
Subject: RE: Excel: Help With A Simple Macro


Hi Chris,
Thanks for that code. Just for fun I tried to record a second macro. I simply hit Control+Y to repeat the first macro and it put your code about row, but I think it said something about EntireRow.

Thanks.

Jim

----------
Jim Homme
Usability Services
412-544-1810
james.homme@xxxxxxxxxxxx

"Strength does not come from physical capacity. It comes from an indomitable will." -- Mahatma Gandhi


-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Christopher Edwards
Sent: Tuesday, August 25, 2009 10:54 AM
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Excel: Help With A Simple Macro

Hi Jim,

If you have not found the answer already replace the number of the row you
are in with the following code

ActiveCell.column

or

ActiveCell.Row

depending on whether you want to hide a row or a column.

Chris


----- Original Message -----
From: "Homme, James" <james.homme@xxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, August 25, 2009 1:16 PM
Subject: Excel: Help With A Simple Macro


Hi,
How do I make a macro work on any row I happen to be on? I'm working with
Excel 2007. I recorded a macro that hides the row I'm looking at. When I
looked at the code, the macro had a hard-coded number for the row I was
focused on. I'm sure there must be syntax that says something like select
the current row and change the hide property so that it's hidden. Once I get
that done, I may make one that lists hidden rows and then I can pick one I
want to unhide. I may do the same thing for columns, but I have to start
somewhere.

Thanks.

Jim

----------
Jim Homme
Usability Services
412-544-1810
james.homme@xxxxxxxxxxxx

"Strength does not come from physical capacity. It comes from an indomitable
will." -- Mahatma Gandhi



This e-mail and any attachments to it are confidential and are intended
solely for use of the individual or entity to whom they are addressed.  If
you have received this e-mail in error, please notify the sender immediately
and then delete it.  If you are not the intended recipient, you must not
keep, use, disclose, copy or distribute this e-mail without the author's
prior permission.  The views expressed in this e-mail message do not
necessarily represent the views of Highmark Inc., its subsidiaries, or
affiliates.
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________ Information from ESET Smart Security, version of virus signature
database 4365 (20090825) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4366 (20090825) __________

The message was checked by ESET Smart Security.

http://www.eset.com



__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark Inc., its subsidiaries, or affiliates.
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind


__________ Information from ESET Smart Security, version of virus signature database 4366 (20090825) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature 
database 4367 (20090825) __________

The message was checked by ESET Smart Security.

http://www.eset.com



__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: