Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Visual BASIC in Excel

hi,
I would put the code in the worksheet change event.

Cells(1,1).interior.colorindex = 40
or
range("A1").interior.colorindex = 40

see this site for excel color indexes.
http://www.mvps.org/dmcritchie/excel/colors.htm

regards
FSt1


"Emerogork via OfficeKB.com" wrote:

I can write the code but wonder where to place it and how to activate it in a
spread sheet.
I hope to run the code when the value in a cell changes.

How do I control the cell background color in VB code? Specifically, I wish
to change from grey to crosshatch when someone clicks on the cell. (Maybe
there is a better way without using VB?)

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200708/1


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
Visual Basic Programming for Excel Venkatesh New Users to Excel 4 August 6th 07 11:48 AM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM
Excel and Visual Basic \remy khalil via OfficeKB.com\ Excel Discussion (Misc queries) 1 July 7th 05 01:05 PM
visual basic in excel - DKehl Excel Discussion (Misc queries) 2 March 23rd 05 07:23 PM
Formula in Visual Basic For Excel imej-clavier Excel Discussion (Misc queries) 2 December 23rd 04 01:43 PM


All times are GMT +1. The time now is 07:03 PM.

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"