Posts by Logit

    Using the VBA Project Properties as a means to protect your source code will be sufficient for

    end users who do not know anything about programming with VBA, do not have the DEVELOPER tab

    active on their copy of EXCEL and are only basic users of EXCEL.


    The password function built in to the VBA Project Properties is easily bypassed. You can verify this

    for yourself by doing an internet search for bypassing or breaking the EXCEL password.


    Not trying to talk you out of it ... just want you to be aware of the vulnerability of the builtin EXCEL

    password system.


    The next question is : Is there anything outside of EXCEL that can protect my code ?

    The simple answer is : NO there is not.


    There are plenty of 3rd party add-ons that claim to protect the code or obfuscate the code but those too

    may be broken / bypassed.


    Again .. just so you are aware.

    This works here with Excel 2007. It should work fine with you version.


    Code
    1. Option Explicit
    2. Sub OpnVBE()
    3. Application.VBE.Windows("Immediate").Visible = True
    4. End Sub


    The password portion of your project is not difficult to create. However, you are aware that it is pretty easy to open the

    VBE, bypassing passwords ... yes ?


    Please explain how you plan to protect the VBE .

    Try this version :


    Not certain about a BATCH file approach. I couldn't locate one in my toolbox ...


    Here is an Excel project that will import a single or multiple text files into Excel :


    How is the data shown in your worksheet ?


    In other words: name, department, age , DOB and working day


    Is NAME always in Col A; DEPARTMENT always in Col B; DEPARTMENT always in Col C; AGE always in Col D; DOB always in Col E; WORKING DAY always in Col F ?


    Posting a sample copy of your workbook with dummy data would be helpful.

    I'm not seeing the 'bug' here. This works as stated :


    Code
    1. Option Explicit
    2. Sub ChngFont()
    3. ActiveCell.Font.Name = "Arial"
    4. ActiveCell.Font.Color = vbBlack
    5. End Sub

    Just realized I left out one line of code ...


    Updated code :


    Files

    • parksdata.xlsm

      (33.59 kB, downloaded 129 times, last: )

    Comments:


    There are different ways to accomplish your goal. Presented here is one.


    To provide an answer quickly, I chose to work with macros saved in my "toolbox". This is not a reflection

    on the code you posted.


    This code will function as needed so long as it is used "as is". If the sheet names / locations / index positions are changed, the code

    will not function as needed.


    Files

    • parksdata.xlsm

      (33.95 kB, downloaded 122 times, last: )

    Hmmm ..... if the sheets layout vary from one to another ... if the future brings other changes .... creating a formula or macro

    that will accomplish your goal is not possible.


    To attain the goal .... your workbook will need to have consistency with the DATA tabs and the NAMES tab.


    Specifically with the DATA tabs, the tabs needs to be arranged identical to DATA2 , even though some of the columns may not have entries

    depending on the tab :


    Name Title Hours Metric1 Metric2 Metric3


    Also, there needs to be a NAMES tab, with the names listed in Col A as presently show.


    Is this possible ?