LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
Min Min is offline
external usenet poster
 
Posts: 40
Default where do I put the code?!

This is some of the code.
I'm sorry but I really am an amateur so any help is greatly appreciated!
Many thanks


Private Sub CheckBox1_Click()
If CheckBox1 = False Then
Columns("K:U").Select
Selection.EntireColumn.Hidden = True
Range("A2").Select
OptionButton1 = False 'Show all
ActiveWindow.ScrollColumn = 1

Else
Columns("K:U").Select
Selection.EntireColumn.Hidden = False
ActiveWindow.ScrollColumn = 11
Range("K2").Select
End If

End Sub

If Not Intersect(Target, Range("R2:R36")) Is Nothing Then
Select Case Target
Case "2a" To "5c"
icolor = 33
Case "1c"
icolor = 45
Case "1b"
icolor = 4
Case "1a"
icolor = 33
Case "w"
icolor = 3
Case Else
End Select
Target.Interior.ColorIndex = icolor
End If



"papou" wrote:

Hello
Show at least a portion of the code you have on one sheet.

Cordially
Pascal

"Min" a écrit dans le message de news:
...
Do i place the code in 'This workbook'? How do I get each sheet to refer
to it?
Apologies, I'm obviously an amateur!

"papou" wrote:

Hello
If you are calling sheet events, consider using at workbook level in
Thisworkbook.

HTH
Cordially
Pascal

"Min" a écrit dans le message de news:
...
I have a workbook with 18 sheets in it, and each sheet has exactly the
same
vb code. When I need to change something I'm having to change it on
each
sheet. Is there somewhere that I can put just one lot of code and all
the
sheets will work from it?






 
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
Convert a Number Code to a Text Code Traye Excel Discussion (Misc queries) 3 April 6th 07 09:54 PM
Code expantion , with code! Arran Excel Discussion (Misc queries) 7 January 14th 07 01:05 AM
Unprotect Code Module in Code Damien Excel Discussion (Misc queries) 2 April 18th 06 03:10 PM
copying vba code to a standard code module 1vagrowr Excel Discussion (Misc queries) 2 November 23rd 05 04:00 PM
Write a code by code Excel Discussion (Misc queries) 1 March 23rd 05 02:34 PM


All times are GMT +1. The time now is 07:45 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"