Home

Display and edit a selected range range only?

%3CLINGO-SUB%20id%3D%22lingo-sub-673347%22%20slang%3D%22en-US%22%3EDisplay%20and%20edit%20a%20selected%20range%20range%20only%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-673347%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all.%20I%20need%20to%20display%20only%20a%20selected%20range%20of%20cells%20in%20a%20Worksheet%2C%20for%20example%2C%20from%20A1%3AI55%20for%20users%20to%20see%20and%20use%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-673347%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-673460%22%20slang%3D%22en-US%22%3ERe%3A%20Display%20and%20edit%20a%20selected%20range%20range%20only%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-673460%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F355657%22%20target%3D%22_blank%22%3E%40Johnnygripfast%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3Eyou%20can%20use%20the%20following%20macro%20from%20my%20%3CA%20title%3D%22VBA-Tanker%22%20href%3D%22http%3A%2F%2Fwww.vba-tanker.com%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Evba-Tanker%3C%2FA%3E.%20See%20attached%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3ESub%20Hide()%3CBR%20%2F%3E%3CBR%20%2F%3EWith%20ActiveSheet%3CBR%20%2F%3E.Range(.Columns(9)%2C%20.Columns(16384)).Hidden%20%3D%20True%3CBR%20%2F%3E.Range(.Rows(56)%2C%20.Rows(1048576)).Hidden%20%3D%20True%3CBR%20%2F%3EEnd%20With%3CBR%20%2F%3E%3CBR%20%2F%3EEnd%20Sub%3CBR%20%2F%3E%3CBR%20%2F%3ESub%20show()%3CBR%20%2F%3E%3CBR%20%2F%3EWith%20ActiveSheet%3CBR%20%2F%3E.Columns.Hidden%20%3D%20False%3CBR%20%2F%3E.Rows.Hidden%20%3D%20False%3CBR%20%2F%3EEnd%20With%3CBR%20%2F%3E%3CBR%20%2F%3EEnd%20Sub%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%20from%20germany%3C%2FP%3E%3CP%3EBernd%3C%2FP%3E%3C%2FLINGO-BODY%3E
Johnnygripfast
Occasional Visitor

Hi all. I need to display only a selected range of cells in a Worksheet, for example, from A1:I55 for users to see and use?

1 Reply

@Johnnygripfast 

Hi, 

you can use the following macro from my vba-Tanker. See attached file.

 

Sub Hide()

With ActiveSheet
.Range(.Columns(9), .Columns(16384)).Hidden = True
.Range(.Rows(56), .Rows(1048576)).Hidden = True
End With

End Sub

Sub show()

With ActiveSheet
.Columns.Hidden = False
.Rows.Hidden = False
End With

End Sub

 

Best regards from germany

Bernd

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies