Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a macro to hide a colum B of spreasheet 1

Status
Not open for further replies.

Jimmy24

IS-IT--Management
Sep 7, 2006
21
US
Dear Sir or Madam,

Would you please assist me with the following task. I have the below copydata macro, that refreshes data from another worksheet, I like to be able that after finished refreshing the data to hide the entire column B. Would you please advice. Thank you in advance


Sub copydata()
'
Range("A2").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.ClearContents
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollRow = 1394
ActiveWindow.ScrollRow = 1392
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 5
ActiveWindow.ScrollRow = 2
Workbooks.Open Filename:= _
"H:\RECPT\Employee List\Emp phone directory list.xls"
Range("A2").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Copy
Windows("Emplisttemplate.xls").Activate
ActiveSheet.Paste
End Sub
 
Jimmy24,
what have you tried?
did you try tools > macro > record new macro
hide a column
then stop the recording and view the code?
regards,
longhair
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top