Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Control Box assigned to multiple spreadsheets

I have the VB script to change the background color of my cells working but I
would like it to change another cell in a different worksheet. Can anybody
help me out with how to program the reference?

Here is the VB script I'm using to change the colors at the moment

Range("C5").Interior.ColorIndex = -4138 - Range("C5").Interior.ColorIndex
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Control Box assigned to multiple spreadsheets

Hi
With Worksheets("MyOtherSheet")
.Range("C5").Interior.ColorIndex = -4138 - .Range
("C5").Interior.ColorIndex
End with

note the period in front of both Range.
If you want to do it on all sheets

Dim ws as worksheet
For each ws in Activeworkbook.Worksheets
With ws
.Range("C5").Interior.ColorIndex = -4138 - .Range
("C5").Interior.ColorIndex
End with

regards
Paul


On May 12, 11:26*pm, LUKEMUDGE
wrote:
I have the VB script to change the background color of my cells working but I
would like it to change another cell in a different worksheet. Can anybody
help me out with how to program the reference?

Here is the VB script I'm using to change the colors at the moment

Range("C5").Interior.ColorIndex = -4138 - Range("C5").Interior.ColorIndex


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
Update multiple spreadsheets in multiple workbooks TAP Setting up and Configuration of Excel 1 October 5th 10 01:36 AM
Multiple spreadsheets Tom59 New Users to Excel 6 November 30th 08 06:11 AM
how do i control double spreadsheets? RTR Excel Discussion (Misc queries) 1 February 22nd 06 09:48 PM
How to update multiple links in multiple spreadsheets followin mo. Andy Excel Worksheet Functions 0 January 20th 05 04:51 PM
Images cannot be assigned to Listview control kvenku[_15_] Excel Programming 0 June 9th 04 12:56 PM


All times are GMT +1. The time now is 11:15 AM.

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"