VBA

Moderators: PavlinII
Number of threads: 1671
Number of posts: 3076

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
excel macro sheet dropdown error. Posted by ultimatefish76 on 16 May 2011 at 8:53 AM
I'm a very green 'programmer' and I'm having some trouble with having a dropdown object in 'sheet1' that I want to display all the sheets titles.

Here is what I have for the code:

Sub dropdown()
Dim Arr() As String
Dim I As Integer
ReDim Arr(Sheets.Count - 1)
For I = 0 To Sheets.Count - 1
Arr(I) = Sheets(I + 1).Name
Next I
AllSheetNames = Arr
End Sub

When I run it, or save it. I get nothing in the dropdown box.

Help?

Ps. I got that code from this site as well.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.