ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA - Drop down; list range (https://www.excelbanter.com/excel-programming/304014-vba-drop-down%3B-list-range.html)

Timse[_6_]

VBA - Drop down; list range
 
Hi,

I have problems when I'm trying to define range of the list where fro
drop down -menu takes its values.

The area is variable and actually it is the problem. Here is an exampl
which might help you to understand my problem. The bolded area is no
working. On the other hand it's not giving any error reports nor.

n = Range("AJ1").Value

ActiveSheet.Shapes("Drop Down 18").Select
With Selection
.ListFillRange = *"$AH$1:$AI$" & CStr(n) *
.LinkedCell = "$AJ$2"
.DropDownLines = 10
.Display3DShading = False
End With


So if somebody knows how to manage with this problem I would be ver
thankful.


-Tims

--
Message posted from http://www.ExcelForum.com


Debra Dalgleish

VBA - Drop down; list range
 
There should be a dot at the start of each line in the With...End With
section:

With Selection
.ListFillRange = "$AH$1:$AI$" & CStr(n)
.LinkedCell = "$AJ$2"
.DropDownLines = 10
.Display3DShading = False
End With


Timse < wrote:
Hi,

I have problems when I'm trying to define range of the list where from
drop down -menu takes its values.

The area is variable and actually it is the problem. Here is an example
which might help you to understand my problem. The bolded area is not
working. On the other hand it's not giving any error reports nor.

n = Range("AJ1").Value

ActiveSheet.Shapes("Drop Down 18").Select
With Selection
ListFillRange = *"$AH$1:$AI$" & CStr(n) *
LinkedCell = "$AJ$2"
DropDownLines = 10
Display3DShading = False
End With


So if somebody knows how to manage with this problem I would be very
thankful.


-Timse


---
Message posted from http://www.ExcelForum.com/



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com