Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-25-2021, 11:45 AM
michissimo michissimo is offline VBA - Hide Column Windows 10 VBA - Hide Column Office 2019
Novice
VBA - Hide Column
 
Join Date: Oct 2017
Posts: 10
michissimo is on a distinguished road
Default VBA - Hide Column

Hey,


I'm trying to create a really easy VBA script for hiding the column from E to H.
When I run the code all the Column from A to I are hidden. I don't understand why! Can someone help me?





Thanks in forward



Code:
Sub Macro3()

    Columns("E:H").Select
    Selection.EntireColumn.Hidden = True
    Range("F3").Select
    
    
End Sub
Reply With Quote
  #2  
Old 05-25-2021, 04:53 PM
NoSparks NoSparks is offline VBA - Hide Column Windows 10 VBA - Hide Column Office 2010
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Do you have merged cells ?
Reply With Quote
  #3  
Old 05-26-2021, 12:15 PM
michissimo michissimo is offline VBA - Hide Column Windows 10 VBA - Hide Column Office 2019
Novice
VBA - Hide Column
 
Join Date: Oct 2017
Posts: 10
michissimo is on a distinguished road
Default

You're right!
Thank's you
Reply With Quote
  #4  
Old 06-11-2021, 12:38 PM
john_red's Avatar
john_red john_red is offline VBA - Hide Column Windows 7 64bit VBA - Hide Column Office 2010
Novice
 
Join Date: Jan 2020
Location: Alabama
Posts: 2
john_red is on a distinguished road
Default

Hi,

Try this userform that I created to hide-unhide columns :
Attached Files
File Type: xlsm hide_unhide_sheet_columns_last- (1).xlsm (87.7 KB, 12 views)
Reply With Quote
  #5  
Old 06-11-2021, 01:45 PM
Purfleet Purfleet is offline VBA - Hide Column Windows 10 VBA - Hide Column Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Quote:
Originally Posted by NoSparks View Post
Do you have merged cells ?
Merged cells are evil
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invioce: Hide cost in column F melvin1942 Excel 2 04-20-2018 07:01 AM
Hiding column does not hide chart series HFLO Excel 2 10-09-2017 12:33 AM
How to Hide/Un-hide a worksheet based on cell on another sheet. easton11 Excel Programming 1 06-02-2015 12:07 PM
How can I temporarily break a 3 column format in order to type a single column paragraph William P Word 1 01-04-2015 06:40 PM
Hide Row and Column Headers mhlipp Excel 1 11-14-2011 05:10 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft