Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default dynamic validation list

hi all,
i want to create dynamic validation list in excel. The logic shd be like
this.
i m fetching data from SAP on the click of execute button in sheet2.
at this point of time i want to create dynamic validation list in sheet2 in
row "E". and data to be filled in the list will be fetched from sheet1.
i have added new named range in sheet1 called"mbe"(in sheet1!A)

when user will execute excel i will feel data in sheet1 cloumn A.
and i have written this code in the click of execute button :
With ActiveSheet.Range("myrange")
.Validation.Delete
.Validation.Add xlValidAlertStop, , "=mbe"

.Validation.InCellDropdown = True
.Validation.IgnoreBlank = True
End With

its giving runtime error "1004" (object defined error)
please help me to solve this problem

thanks in advance,
jigs
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default dynamic validation list

You forgot the validation type.

With ActiveSheet.Range("myrange")
.Validation.Delete
.Validation.Add xlValidateList, xlValidAlertStop, , "=mbe"
.Validation.InCellDropdown = True
.Validation.IgnoreBlank = True
End With


--
HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"jigs d" wrote in message
...
hi all,
i want to create dynamic validation list in excel. The logic shd be like
this.
i m fetching data from SAP on the click of execute button in sheet2.
at this point of time i want to create dynamic validation list in sheet2

in
row "E". and data to be filled in the list will be fetched from sheet1.
i have added new named range in sheet1 called"mbe"(in sheet1!A)

when user will execute excel i will feel data in sheet1 cloumn A.
and i have written this code in the click of execute button :
With ActiveSheet.Range("myrange")
.Validation.Delete
.Validation.Add xlValidAlertStop, , "=mbe"

.Validation.InCellDropdown = True
.Validation.IgnoreBlank = True
End With

its giving runtime error "1004" (object defined error)
please help me to solve this problem

thanks in advance,
jigs



Reply
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
data validation invalid in dynamic validation list ilia Excel Discussion (Misc queries) 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
data validation invalid in dynamic validation list ilia Excel Programming 0 November 7th 06 12:54 PM
Changing named Validation list to Dynamic list. GlenC Excel Discussion (Misc queries) 1 July 20th 06 11:49 PM
Dynamic validation list stabilo Excel Programming 4 August 4th 05 03:41 PM


All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"