Data Validation Drop Down Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Having created the above drop down box everything is fine except for the font size of the "Pick list" i created. i have tried changing the font size on the source cells but this makes no difference. I would like to keep the drop down box in Data Validation as it is so easy to set up and also it looks better as the arrow control only shows up on the selected cell. Once the selection is made it appears fine in the cell but on the list it is so small its almost unreadable

Anyone to the rescue?
 
Followed the link which was great - Thanks!. I have copy and pasted the code as given into the "view code" section of the worksheet. Nothing different seems to be happening. I closed the programme and started it up again but still nothing. Should i have taken any other steps to actually activate the code other than just copy & paste it?
 
Hi Adrian
assuming you have pasted the following code
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$2" Then
ActiveWindow.Zoom = 120
Else
ActiveWindow.Zoom = 100
End If
End Sub

Have you changed the Address reference in line 2. This should be your
specific cell

Frank
 
Did you follow the instructions for pasting the code onto the sheet's
code module, and did you change the cell reference to match your data
validation cell?
 
I did change the cell reference to match the relevant cell in my worksheet. what i did exactly was open the worksheet, right click the worksheet tab, opened the view code box which opened a design sheet & i then pasted the code on to the open sheet then closed this sheet. Should i have press an activate or update button or something? I have tried to view the page in normal and page break preview to see it this would have any effect but still no joy. I am using Office XP. Any ideas where i am going wrong

----- Debra Dalgleish wrote: ----

Did you follow the instructions for pasting the code onto the sheet's
code module, and did you change the cell reference to match your data
validation cell

Adrian Phelan wrote
 
You may want to post the code.

But my guesses are these:

#1. You didn't put the code behind the worksheet?????

#2. When you changed this line:
If Target.Address = "$A$2" Then
you either left the $'s out or used a lower case letter.

Any chance I guessed right?
 
I don't know how to put the code behind the worksheet - Can you tell me what to do

I have copied the code below where i have changed the cell reference to "B7" every thing seems fine to me - everyones help is much appreciated! It is now 02.57 hrs in london and i have been at this since 21.00 hrs and i am fading fast

Private Sub Worksheet_SelectionChange(ByVal Target As Range
If Target.Address = "$B$7" The
ActiveWindow.Zoom = 12
Els
ActiveWindow.Zoom = 10
End I
End Su

----- Dave Peterson wrote: ----

You may want to post the code

But my guesses are these

#1. You didn't put the code behind the worksheet????

#2. When you changed this line
If Target.Address = "$A$2" The
you either left the $'s out or used a lower case letter

Any chance I guessed right





Adrian Phelan wrote
 
Right click the sheet tab where you have the validation in B7, select view
code and paste in the code
press Alt + Q to close the VBA editor. Now try it

--

Regards,

Peo Sjoblom

Adrian Phelan said:
I don't know how to put the code behind the worksheet - Can you tell me what to do?

I have copied the code below where i have changed the cell reference to
"B7" every thing seems fine to me - everyones help is much appreciated! It
is now 02.57 hrs in london and i have been at this since 21.00 hrs and i am
fading fast!
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$7" Then
ActiveWindow.Zoom = 120
Else
ActiveWindow.Zoom = 100
End If
End Sub

----- Dave Peterson wrote: -----

You may want to post the code.

But my guesses are these:

#1. You didn't put the code behind the worksheet?????

#2. When you changed this line:
If Target.Address = "$A$2" Then
you either left the $'s out or used a lower case letter.

Any chance I guessed right?
worksheet. what i did exactly was open the worksheet, right click the
worksheet tab, opened the view code box which opened a design sheet & i then
pasted the code on to the open sheet then closed this sheet. Should i have
press an activate or update button or something? I have tried to view the
page in normal and page break preview to see it this would have any effect
but still no joy. I am using Office XP. Any ideas where i am going wrong?pasted the code as given into the "view code" section of the worksheet.
Nothing different seems to be happening. I closed the programme and started
it up again but still nothing. Should i have taken any other steps to
actually activate the code other than just copy & paste it?
 
Did it - No joy! What next

----- Peo Sjoblom wrote: ----

Right click the sheet tab where you have the validation in B7, select vie
code and paste in the cod
press Alt + Q to close the VBA editor. Now try i

--

Regards

Peo Sjoblo

Adrian Phelan said:
I don't know how to put the code behind the worksheet - Can you tell m what to do
"B7" every thing seems fine to me - everyones help is much appreciated! I
is now 02.57 hrs in london and i have been at this since 21.00 hrs and i a
fading fast
If Target.Address = "$B$7" The
ActiveWindow.Zoom = 12
Els
ActiveWindow.Zoom = 10
End I
End Su
If Target.Address = "$A$2" The
you either left the $'s out or used a lower case letter
worksheet. what i did exactly was open the worksheet, right click th
worksheet tab, opened the view code box which opened a design sheet & i the
pasted the code on to the open sheet then closed this sheet. Should i hav
press an activate or update button or something? I have tried to view th
page in normal and page break preview to see it this would have any effec
but still no joy. I am using Office XP. Any ideas where i am going wrongpasted the code as given into the "view code" section of the worksheet
Nothing different seems to be happening. I closed the programme and starte
it up again but still nothing. Should i have taken any other steps t
actually activate the code other than just copy & paste it
 
Maybe it would have helped if I had looked at earlier threads..

--

Regards,

Peo Sjoblom

Peo Sjoblom said:
Right click the sheet tab where you have the validation in B7, select view
code and paste in the code
press Alt + Q to close the VBA editor. Now try it

--

Regards,

Peo Sjoblom

Adrian Phelan said:
I don't know how to put the code behind the worksheet - Can you tell me what to do?

I have copied the code below where i have changed the cell reference to
"B7" every thing seems fine to me - everyones help is much appreciated! It
is now 02.57 hrs in london and i have been at this since 21.00 hrs and i am
fading fast!
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$7" Then
ActiveWindow.Zoom = 120
Else
ActiveWindow.Zoom = 100
End If
End Sub

----- Dave Peterson wrote: -----

You may want to post the code.

But my guesses are these:

#1. You didn't put the code behind the worksheet?????

#2. When you changed this line:
If Target.Address = "$A$2" Then
you either left the $'s out or used a lower case letter.

Any chance I guessed right?
worksheet. what i did exactly was open the worksheet, right click the
worksheet tab, opened the view code box which opened a design sheet & i then
pasted the code on to the open sheet then closed this sheet. Should i have
press an activate or update button or something? I have tried to view the
page in normal and page break preview to see it this would have any effect
but still no joy. I am using Office XP. Any ideas where i am going wrong? the
pasted the code as given into the "view code" section of the worksheet.
Nothing different seems to be happening. I closed the programme and started
it up again but still nothing. Should i have taken any other steps to
actually activate the code other than just copy & paste it?
 
I changed it from high to medium but still no change


----- Debra Dalgleish wrote: -----

Do you have Security set to Medium? (Tools>Macro>Security)
 
Did you close and open Excel after this?
--

Regards,

Peo Sjoblom

Adrian Phelan said:
I changed it from high to medium but still no change


----- Debra Dalgleish wrote: -----

Do you have Security set to Medium? (Tools>Macro>Security)
worksheet. what i did exactly was open the worksheet, right click the
worksheet tab, opened the view code box which opened a design sheet & i then
pasted the code on to the open sheet then closed this sheet. Should i have
press an activate or update button or something? I have tried to view the
page in normal and page break preview to see it this would have any effect
but still no joy. I am using Office XP. Any ideas where i am going wrong?pasted the code as given into the "view code" section of the worksheet.
Nothing different seems to be happening. I closed the programme and started
it up again but still nothing. Should i have taken any other steps to
actually activate the code other than just copy & paste it?
 
Sucess!!!!!!! I closed the sheet then opened it up and enable macros as advised and Bingo! Houston we have lift off!. Thank you all very much - its been a long night!!

----- Adrian Phelan wrote: -----

Having created the above drop down box everything is fine except for the font size of the "Pick list" i created. i have tried changing the font size on the source cells but this makes no difference. I would like to keep the drop down box in Data Validation as it is so easy to set up and also it looks better as the arrow control only shows up on the selected cell. Once the selection is made it appears fine in the cell but on the list it is so small its almost unreadable!

Anyone to the rescue?
 
Back
Top