dynamic named range as listbox rowsource


"Excel VBA Help"

 


Play Friv Now - Play Friv Games
Go Back   The Code Cage Forums > Microsoft Topics > Microsoft Excel Forum
Our Info Pages:-
The Code Cage - Microsoft Office help

Notices

Microsoft Excel Forum Members Post questions in this forum if they are related to using Microsoft Excel, this includes Worksheet Functions, Excel VBA Programming, Simple Macro Code & Charting, Excel formula etc.

New Reply
Thread Tools Rate Thread Display Modes
  #1  
Unread 3rd March 2017, 12:58
silvapereira's Avatar
silvapereira silvapereira is offline
Junior Member
MS Office Version: Ms Office 2013
MS Office Skill Level: Some VBA experience
 
Join Date: Feb 2017
Location: Lisbon, Portugal
Posts: 28
Posts Per Day: 0.17
My Top Tip Count: 0
Thanks to others: 1
Thanked 0 Times in 0 Posts
Reputation: 10 (1) silvapereira is on a distinguished road
Portugal
Default dynamic named range as listbox rowsource
     Excel: VBA   


------ Register to get rid of these "In Post" ads! ------

Category: Excel: VBA   

Hi!
I have a problem, sure is easy to solve but I can't figure it out!
I have this userform to filter data from the worksheet. It as 3-4 textboxes and one listbox. the listbox rowsource is a dinamic named range on the sheet. When i filter the data the listbox is populated with the results of that search.
It works very well till the filtered results have no records, so the dinamic named range stays empty and I get the error #could not set the rowsource property. Invalid property value#.

Can You hellp me with this?

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!

  #2  
Unread 8th March 2017, 23:12
silvapereira's Avatar
silvapereira silvapereira is offline
Junior Member
MS Office Version: Ms Office 2013
MS Office Skill Level: Some VBA experience
 
Join Date: Feb 2017
Location: Lisbon, Portugal
Posts: 28
Posts Per Day: 0.17
My Top Tip Count: 0
Thanks to others: 1
Thanked 0 Times in 0 Posts
Reputation: 10 (1) silvapereira is on a distinguished road
Portugal
Default Re: dinamic named range as listbox rowsource

------ Register to get rid of these "In Post" ads! ------


Well I solve That problem, but now iam struggling with another one.
I have a userform that can add or delete cells on a dinamic named range (DNR)
it works ok till I delete the first entry of that DNR, lets say the first entry is on B3, when I deleted it the value on C3 becomes and substitues the value that was on B3, but somehow, and I don't know why ... the DNR looses its references and becomes usefulless.
Offset(List!#Ref!,,, ... ) instead of the previous Offset(List!$B$3,,, ...).
Can someone help me with this please.
Thanks

  #3  
Unread 9th March 2017, 21:38
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
Administrator
MS Office Version: MS Office 97 - 2013
MS Office Skill Level: Can use most of MS Office
 
Join Date: Aug 2008
Location: Manchester, England
Age: 52
Posts: 11,880
Posts Per Day: 3.64
My Top Tip Count: 11
Thanks to others: 49
Thanked 441 Times in 425 Posts
Reputation: 6660 (193) Simon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond reputeSimon Lloyd has a reputation beyond repute
11 Top Tips
Wales
Default Re: dinamic named range as listbox rowsource

------ Register to get rid of these "In Post" ads! ------


Why not add a File?
Providing a file for your particular application will not only get you your answer quicker but will better illustrate your problem, usually when we can see your data (it can be dummy data but must be of the same type) and your structure it is far easier for us to give you a tailored, workable answer to your query

Attachments.
Information

Information

To upload a file, click reply then add your few words, to the left you will see the Manage Attachments button, this is where you get to add files for upload, scroll down to the see submit button, if you have any trouble please use this Contact Us link or the one at the bottom of the any page.



__________________
Regards,
Simon Lloyd
Microsoft Office Help

Want to say thanks? then hit this How to say thanks! button in any post you want to thank
If you find one of my posts helpful then hit this one Helpful Answer in the post that helped most!



The Code Cage Advertisment
Advertisement
New Reply
The Code Cage at Facebookhe Code Cage at Twitter


Tags
dinamic, listbox, named, range, rowsource

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

The Code Cage Affilliates



http://www.thecodecage.com/forumz tested by McAfee Security http://www.thecodecage.com/forumz tested by McAfee Security

All times are GMT +1. The time now is 21:36.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Template-Modifications by TMS
No part of this board, functionality or creatives may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
Copyright ©2008 - , Simon lloyd.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application they represent and are used with permission from Microsoft
UA-8135493-1
Cultural Forum | Study at Malaysian University