VBA to Hide active row where cursor is

Crocdundee

Board Regular
Joined
May 10, 2010
Messages
169
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:

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

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
47,926
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
169
Office Version
  1. 2013
Platform
  1. Windows
Big thank you to both of you guys, really appreciate what you guys do here.
Graham
 

Watch MrExcel Video

Forum statistics

Threads
1,122,670
Messages
5,597,482
Members
414,144
Latest member
UDFNewbie

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