LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default I set up a macro to hide/unhide columns. It hides more columns

It is supposed to hide column J, copy column I, paste special (values) to
column J and re-hide column J. It does all that AND THEN hides columns G
through L instead of just J. I I have no idea how to correct.. Help... Lori
Sub Test()
'
' Test Macro
' Macro recorded 9/6/2006 by LORI MILLER
'
' Keyboard Shortcut: Ctrl+a
'
Columns("I:K").Select
Selection.EntireColumn.Hidden = False
Range("I11:I34").Select
Selection.Copy
Range("J11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

'Hide Column J

Columns("J:J").Select

Selection.EntireColumn.Hidden = True

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to hide/unhide columns Monique Excel Programming 5 August 4th 06 04:32 PM
When i hide columns it hides whole sheet CathyL Excel Discussion (Misc queries) 1 June 15th 06 07:51 PM
How do I hide or unhide zero value columns/rows USING A MACRO? paul Excel Discussion (Misc queries) 1 January 23rd 06 03:06 PM
Macro to hide or unhide columns Chance224 Excel Programming 1 February 14th 05 09:34 PM
A recorded Macro to hide certain selected columns hides non selec. Mlmotter Excel Programming 2 December 31st 04 02:56 PM


All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"