Posts by Balangan

    Hi all,


    I would like to create a Worksheet that contains all the Users in our Organization. The Users are all stored in Active Directory on the Domain Controller.
    Is there a way in Excel to query Active Directory in order to obtain a list of the users?


    Thanks in advance,

    Re: VBA: Template w/ macros & toolbar


    OK I post it here for all. This is a readaption to my needs of some code developed originally by some senior member here (sorry i forgot your nick!). I must say 1000 thanks to him.
    It contains some names from my custom bars and submenus, that you will need to change properly.
    I use this macro to run automatically when the file is opened. The result is that wherever you open the file, from the network for example, it will work just fine.



    That's it! :)

    Hi all,


    I am working on a template. Users should open this template and then make some changes and save it as "Invoice 01", "Invoice 02", "Invoice 03", etc.
    Is there any way to change the name (usually "doc1.doc") that Word suggests in the "File-Save As" window to something different?


    Thank you all for any help,

    Re: VBA: Template w/ macros & toolbar


    I spotted this post while searching for something else. If anyone is still interested, time ago we developed a solution to this problem, a macro that fixes all the links in the toolbar. just drop a line and i'll look for it and post it

    Hi all,


    In my worksheet, that counts up to thousands of rows, I have 2 kinds of cells: cells that contain a real numeric value (i.e. "5") and cells that contain, instead, a calculated numeric value (i.e. "=(a34/100)" ; meaning a value that is not a number but a formula).


    I am trying to apply a filter, in a certain column, so that it can either show only the cells that contain a real numeric value , or only the cells that contain those formulas.
    Can anyone kindly help me?


    Thanks in advance

    Wow I finally made it work, thanks Derk :)
    Here is what has to be done: I have 1 toolbar I want to update, its name is "Gestione". It contains both buttons (where you click and run a linked macro) and submenus, that contain more buttons each.
    So this code will take care of the normal buttons:


    Sub FixMenu()
    Dim c As Object
    For Each c In CommandBars("Gestione").Controls
    c.OnAction = Mid(c.OnAction, InStr(c.OnAction, "!") + 1) 'get macro name
    Next c
    End Sub


    Now for the submenus we have to use it some more, just filling now with the names of each submenu. My submenus is called "SCHEDA" :


    Sub FixubMenu()
    Dim c As Object
    For Each c In CommandBars("Gestione").Controls("SCHEDA").Controls
    c.OnAction = Mid(c.OnAction, InStr(c.OnAction, "!") + 1) 'get macro name
    Next c
    End Sub


    this second macro will take care of the inner submenus buttons. Thanks a lot, Derk! :)

    Yes thank you. I am afraid that some coding is required. Anyway lets keep in touch because I *have* to find a solution for this problem! I just dont know VBA too much, and usually write my macros starting with the macro recorder, and then readapting to my needs. But in this case, when I relink the toolbars, the macro recorder does not record anything at all, so I dont know which way to go!

    I would like to use Access Forms to input data in Excel. According to Excel Guide, once you have fully installed Access and Excel, including the optional components, I should see a new command "Access Form" (or something like that) under the "Data" menu, when a cell is selected.
    I have done all these things but nothing. Any hints?


    Thanks in advance

    Yes, thanks for the hint. :) That would work perfectly in case you need to *move* the file.
    I now made some other testing myself. Since the original problem for me was how to *copy* a file from its original location to another without having to change the path of all the macros linked to the toolbars (i have dozens of them sometimes), I still have not solved it.
    Whenever I make a copy of the file I saw that I have 2 scenarios:
    1) Make a copy somewhere else with the same file name (Ex: file "c:\cartel1.xls" copied to "d:\cartel1.xls").
    In this case Excel will look for the macro project contained in the original file, that has the same name but is in another location, and since it cannot open 2 files with the same name, it will not work.
    2) Make a copy with another file name (Ex: new file is called "Cartel2.xls", it doesnt matter if its in the same folder or in a different location).
    In this case the macros will work, but only because Excel will still open the macro project of the first file in the old location! So if you (like I do) change pc (or network in case of a network), i.e. need to make a copy of a file and bring it home to continue working on the project, you will have to edit the buttons on the toolbars one by one and update the links.. very annoying :barf:


    The point seems now to me: is there some way to "attach" a macro project and its ties with the toolbar to a specific file? Or maybe create a routine that reads the file location and updates the paths of the toolbars?


    Thanks again.

    sorry i think i explained myself badly. I would like to remove only the value of any autofilter, not the existance of the autofilter itself.
    If, for example, autofilter is active and column "B" contains names and has an active filter on name "Mario", i would like the macro to remove it.
    thanks guys

    Hi all :)
    Its a long while I have this problem and found no solution: I have an excel file containing macros that are run clicking a button from the toolbar. Somehow the macros are there identified with their absolute path ('C:\WINDOWS\Desktop\Cartel1.xls'!Macro1). So if I move the excel file somewhere else on the network or even on the same drive, and try to click the button to run the macro, I will get an error message (caused by excel looking for the old path). Is there any way to avoid this? For example telling excel to use relative paths?


    Thanks in advance for your help.