Macros in MS Excel

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Stevrford

Thread Starter
Joined
Feb 4, 2003
Messages
1
Can anyone help?!? I'm quite fluent with MS Excel and formulas and such, but now I'm venturing into macros, and all I can say is.... huh?!?!?!
I've used the help file, and it might as well be written in another language for all the help I've gotten out of it! See the attached file to follow along with my description of my problem.
All I want to do is have a check box (already inserted in cell B4), that when clicked, will turn the cell next to it (C4) yellow to highlight it, and then post a string of text in another cell (A9).
No doubt this is all painfully simple to those familiar with macros, but I'm completely and totally clueless. According to the help files, I need to understand visual basic programming language, and I don't... it gives examples of how to make a macro to highlight the color of a cell, like I'm trying to do, but again... huh?!?! (see below)
Static OldRange As Range
On Error Resume Next
Target.Interior.ColorIndex = 6 ' yellow - change as needed
OldRange.Interior.ColorIndex = xlColorIndexNoneSet OldRange = Target
End Sub

Is there anyone who can walk me thru the process of highlighting the cell, and posting my text string? Please!

Steve


:confused:
 

Attachments

Anne Troy

Anne
Joined
Feb 14, 1999
Messages
11,749

WIP

Joined
Apr 19, 2003
Messages
1
Steve,
Like you I have also do not understand the language when it comes to writting macros. So I do what works for me. It my not be written the way that the experts write it, but it works.

Your problem require 2 steps:

First the code:

Public Sub cb_al()
If Sheets("Sheet2").CheckBoxes("cb_al").value = xlOn Then
[a9] = "Your Text String Here"
End
End If
If Sheets("Sheet2").CheckBoxes("cb_al").value = xlOff Then
[a9] = ""
End If
End Sub

Second Conditional Formatting:

Formula Is: =$a$4>1
Pattern: Yellow

I hope this is what your looking for.

WIP
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top