VBA to Hide active row where cursor is

Crocdundee

Board Regular
Joined
May 10, 2010
Messages
174
Office Version
  1. 2013
Platform
  1. Windows
Hi Here I am again, I would like to create a macro to highlight current row and hide the entire row.
I thank you in advance for any help on this , i am using excel 2013
Regards
Graham
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

ztodd

Board Regular
Joined
Sep 17, 2014
Messages
221
highlight:
selection.entirerow.Interior.ColorIndex=?

hide:
selection.entirerow.hidden = true

You can usually guess at things like this by using the "intellisense" of an object- for example, in your code editor, type "range." and you should see a drop-down appear of all the properties of a range object. After you have typed or selected any object / method / property, you can press F1 to get help on how to use it.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,296
Office Version
  1. 365
Platform
  1. Windows
Given your thread title, you may want to replace "selection" with "ActiveCell" in the previous suggestion.
 

Crocdundee

Board Regular
Joined
May 10, 2010
Messages
174
Office Version
  1. 2013
Platform
  1. Windows
Big thank you to both of you guys, really appreciate what you guys do here.
Graham
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,878
Messages
5,834,200
Members
430,263
Latest member
abz54

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top