View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Neal[_3_] Neal[_3_] is offline
external usenet poster
 
Posts: 7
Default passing spreadsheet cell data to macro

I have a macro to hide a column in an array of worksheets. I would like to have
it get the column from a cell in a worksheet. How do I go about doing that? In
other words, If cell N42 has a J in it, then the J would be transferred to the
macro.

Dim sh As Worksheet
For Each sh In ActiveWindow.SelectedSheets
sh.Columns("g:g").Hidden = True
Next


Thanks

Neal