LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Code not work Take same action on all wkshts or selected works

I am sorry, your write - I mis-spoke it is a validation list. I know the
outer loop works because I took that from another site and tried it and it
works, but when I added all the other stuff it didn't work. If you know how
to make it process worksheets within a selection that would be better. Let
me select them and run then run the macro.

"JLGWhiz" wrote:

You might want to take a look at the InCellDropDown Property in the VBA Help
utility.
It looks like you are trying to modify a validation list, as opposed to a
list box. But, I am not sure of that.

"JLGWhiz" wrote:

I could be wrong, but it looks to me like you are trying to put ten pounds in
a five pound bag.

Shouldn't this:
.ListFillRange = "$N$51:$N$60"
.LinkedCell = "$N$50"
.DropDownLines = 9
be this:
.ListFillRange = "$N$51:$N$60"
.LinkedCell = "$N$50"
.DropDownLines = 10

And this:
.ListFillRange = "$M$51:$M$56"
.LinkedCell = "$M$50"
.DropDownLines = 5

be this:
.ListFillRange = "$M$51:$M$56"
.LinkedCell = "$M$50"
.DropDownLines = 6



"Rookie_User" wrote:

I know this code doesn't work with just selected worksheets but that would be
nice if you know how.

Why doesn't this code work? All I am trying to do is add the list menu size
for a drop down box and add one more item in both cases to the end of the
drop down.

Sub Add_Queue()

ActiveSheet.Shapes("Drop Down 9").Select
With Selection
.ListFillRange = "$N$51:$N$60"
.LinkedCell = "$N$50"
.DropDownLines = 9
.Display3DShading = False
End With

ActiveSheet.Shapes("Drop Down 8").Select
With Selection
.ListFillRange = "$M$51:$M$56"
.LinkedCell = "$M$50"
.DropDownLines = 5
.Display3DShading = False
End With
Range("M56").Select
ActiveCell.FormulaR1C1 = "Queue"

Range("N60").Select
ActiveCell.FormulaR1C1 = "Queue"

Range("I42").Select

End Sub

 
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
VBA Code works in Excel 2003 but won't work in Excel 2000 aglazer Excel Programming 2 September 5th 05 03:52 PM
VBA Code works in Excel 2003 but won't work in Excel 2000 [email protected] Excel Programming 0 September 5th 05 09:05 AM
How do I undo an action when multiple sheets are selected? Jared Excel Worksheet Functions 0 August 15th 05 10:16 PM
Need Macro to Print Selected Wkshts J_F_K_F_C Excel Programming 3 September 1st 04 06:15 PM


All times are GMT +1. The time now is 01:59 AM.

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"