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

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
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.
 
Upvote 0
Given your thread title, you may want to replace "selection" with "ActiveCell" in the previous suggestion.
 
Upvote 0
Big thank you to both of you guys, really appreciate what you guys do here.
Graham
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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
Back
Top