View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Need to write function that will change column width based on a co

You can't change column width inside a function. Only a macro will do it
which means you have either manual activate it or have it in a
Worksheet_Change()
macro.

Sub Worksheet_Change(Target as Range)

if target < 1000 then
Target.ColumnWidth = 15
end if

end sub

"dunlapww" wrote:

Subject says it all, is this a VBA thing or some function I have yet
to discover in the function list. I have no idea how to write this in
VBA. If anyone has any ideas I'd greatly appreciate it. Thanks, Will