Results 1 to 4 of 4

Thread: Vba Code For Dropbox

  1. #1

    Vba Code For Dropbox



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello all,
    I need a help to display all my sheets in my main sheets dropbox.
    i also have a button (update database). so, when i add new sheet i click the update database button so that the new sheet can be listed out on the dropbox in the main page.

    Thanks and regards,
    Leo

    i have attached the picture of my dropbox. please let me know if you guys need any additional information.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Capture.JPG 
Views:	62 
Size:	19.9 KB 
ID:	2011  

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    718
    Articles
    0
    Excel Version
    Excel 2010 64bit
    Is that a combobox and 3 command buttons on a userform with a separate command button on a worksheet?

    You would be far more likely to receive assistance if you upload a sample workbook of what you are working with rather a picture.

  3. #3
    Hi NoS,
    Yes its is a combobox, i have provide the workbook example for your assistance.
    thank you.
    Attached Files Attached Files

  4. #4
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    718
    Articles
    0
    Excel Version
    Excel 2010 64bit
    Hello leoruphen

    To answer your question of populating the combobox, put this code into the "Main" sheet's module and see if it does what you want when sheets are added or deleted.
    You will need to go into the properties for the combobox and remove "fixed" from value so it will be blank.

    Code:
    Private Sub Worksheet_Activate()
        Dim sht As Worksheet
        
    With ComboBox1
       .Clear
        For Each sht In ThisWorkbook.Worksheets
            If sht.Name <> "Main" Then
                If sht.Name <> "fixed" Then
                    .AddItem sht.Name
                End If
            End If
        Next sht
    End With
    
    End Sub
    Last edited by NoS; 2014-02-03 at 06:56 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •