Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default VBA Lock Columns

Hello,

I want to permanently lock columns S:W on my sheet using VBA. I do NOT
want to write a macro. I need it in the following format. Thanks.

Private Sub Worksheet_Change(ByVal Target As Range)

(code)

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default VBA Lock Columns

You say you don't want to write a macro, then show a macro declaration for
the change event. Also, you say permanently - so why do you want it in the
change event (a macro).

Mark all the cells in that range as locked, then protect the sheet with a
password.

--
Regards,
Tom Ogilvy


"DukeDevil" wrote:

Hello,

I want to permanently lock columns S:W on my sheet using VBA. I do NOT
want to write a macro. I need it in the following format. Thanks.

Private Sub Worksheet_Change(ByVal Target As Range)

(code)

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default VBA Lock Columns

What you say is nonsensical. You want to do it using VBA but NOT using a
macro. You can't use VBA without writing a macro (or UDF). Also the format
you give is a macro in itself. You say you want to "lock columns S:W".
Exactly what do you want to do? In other words, what does "lock columns"
mean to you? HTH Otto
"DukeDevil" wrote in message
ps.com...
Hello,

I want to permanently lock columns S:W on my sheet using VBA. I do NOT
want to write a macro. I need it in the following format. Thanks.

Private Sub Worksheet_Change(ByVal Target As Range)

(code)

End Sub



Reply
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
Lock a row at top for titles of columns? bart dotzman Excel Discussion (Misc queries) 7 November 18th 09 11:54 PM
Can I lock 2 columns together so that the 2 cells in a row are joined? Bernard New Users to Excel 3 August 19th 06 04:36 PM
Macro to Lock Columns JavyD Excel Programming 2 July 14th 05 03:16 PM
LOCK columns Rebecca New Users to Excel 2 February 26th 05 05:03 PM
How do I lock hidden columns? Henk Neuhoff via OfficeKB.com Excel Worksheet Functions 3 January 26th 05 12:50 PM


All times are GMT +1. The time now is 04:48 PM.

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

About Us

"It's about Microsoft Excel"