Hello, I have a basic Excel worksheet that allows users to select:
Yes No Maybe
.... and checkboxes to the right. They unfortunately are complaining that the checkboxes are too small, and I cannot make the boxes larger, so...........
Can someone assist in the macro where they can just click on the cell where "Yes" appears, and it will bold and be outlined, and if they click on that same cell again it will go back to normal (No bold and not outlined)?
Of course same would apply for the "No", and the "Maybe".
I'm hoping this is fairly basic. If not, other suggestions? Button to the right of the "Yes", "No", "Maybe", where if the button is selected the "Yes" (ect... ) will format accordingly?
Thank you.
4 2361
sure, inside the worksheet's code, check the SelectionChange event: - Private Sub Worksheet_SelectionChange(ByVal Target As Range)
-
Cells.Font.Bold = False
-
Target.Font.Bold = True
-
End Sub
i think that's a good start, aint it?
(^.^ i've just noticed this code is quite fun to play with)
you can also check this howto (im sure you'll find it useful): http://bytes.com/forum/thread795024.html
That is a good start... thanks!
Only thing is that when I click on "Yes", it will bold, however when i click on another cell it will unbold.
I'd like the users to select "Yes" (or "No, ect..) and have it remain bold, then move on to the next question and select Y,N, and have it bold and stay bold, unless they click on it again and it will unbold.
Since we're this far, how would I go about placing a border around it, changing the background / font color.
Thanks again for your help, it is appreciated!
Hi,
Try this : -
Range("A4").Select
-
Selection.Borders(xlEdgeLeft).LineStyle = xlContinuous
-
Selection.Borders(xlEdgeTop).LineStyle = xlContinuous
-
Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous
-
Selection.Borders(xlEdgeRight).LineStyle = xlContinuous
-
Selection.Font.ColorIndex = 40
-
With Selection.Interior
-
.ColorIndex = 5
-
.Pattern = xlSolid
-
End With
-
Regards
Veena
That is a good start... thanks!
Only thing is that when I click on "Yes", it will bold, however when i click on another cell it will unbold.
I'd like the users to select "Yes" (or "No, ect..) and have it remain bold, then move on to the next question and select Y,N, and have it bold and stay bold, unless they click on it again and it will unbold.
...
well. you'll just have to play a litle bit with som IF / THEN - if target. column = 1 and target.row=1 then
-
'bla bla bla
-
else
-
'bla bla bla
-
'end if
HTH
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bob Bedford |
last post by:
I've a table.
The table must not have any border.
The TR (every line) must have a border, but not the lines between cells.
The TR.pages must have no border.
so .mytable{border:0px;}
...
|
by: effendi |
last post by:
Hi
Can any tell me what is the javascript equivalent of CSS border? I
would like to change the border of my cell when it is set on focus. I
have tried onFocus="style.border='3px'" but it is not...
|
by: Mike Mimic |
last post by:
Hi!
I noticed that for the following code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html...
|
by: plugwalsh |
last post by:
Hi
I need to generate an HTML table that looks like the following:
(Two cells, A & B)
-------------------
| | |
| | B |
| | |
| |--------|
|
by: derelict |
last post by:
Hey all, im getting desperate now.
I have a macro running in Word 2003, when I run the macro it *should* put a 'bottom' cell border in each cell that has the style used - this included a border at...
|
by: Diogenes |
last post by:
Hi All;
I, like others, have been frustrated with designing
forms that look and flow the same in both IE and Firefox.
They simply did not scale the same.
I have discovered, to my chagrin,...
|
by: =?Utf-8?B?TGV0emRvXzF0?= |
last post by:
I'd like to create a Macro that will sort some raw data, apprx 20k lines,
remove some lines based upon a condition in a certain column. Then copy this
data into a new spreadsheet and sort the ...
|
by: acarrazco |
last post by:
Hello, I am totaly new to VBA and I'm trying to modify a macro that was given to me but it doesn't seem to be working. I'm trying to extract data from three excel spreadsheets, put it into a combined...
|
by: gmcconville |
last post by:
Im a little bit stuck on how to change a cell in a datagridview to bold without affecting any of the other attributes of the cell, such as underline, italic etc.
This is what I thought would work...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |