Posts by Ivan F Moala

    Re: Kickbutt VBA Find Function

    Hi Aaron, just a couple of things;

    1) FirstAddress wasn't defined.

    2) I like to use functions where you are given choices rather then guess @ the expected values i.e LookIn = xlValues 'xlFormulas the use wil be expected to places these constant in.

    To this end (For Excel2000+) I use Enum like so ......
    With Enum writing the Code gives the user intellisence options for the Consts.

    Don't take this the wrong way, it is a nice function... one that I will use :)

    Any way for xl2000+ this is how I will use it >

    Re: Event Triggers are not working

    Hi Delores

    May sound silly but

    1) have you enabled macros.
    2) Are you sure you have the Event codes in the correct place.
    3) Do you have any other code that may hinder the event codes from running

    Re: ActiveX Alert Message

    Quote from mjschukas

    is there a way to solve this activex message without changing the registry...?


    thank you.

    Yes, BUT you will need to use SendKeys ...

    Re: extract compressed file attachement...

    if you want to unzip a file then something like this may help

    As far as the rest .... that's doable as well ie... extracting the attachments and unziping

    Re: Progress Bar

    Hi Don

    If I understand you correctly it is the Random numbers you don't need ??

    Just remove the code that does this eg

    'Put a random number in a cell
    Cells(r, c) = Int(Rnd * 1000)

    remove the above ??

    Re: Cannot Run Recorded Code

    The use of the Const is due to a bug for this particular property of the Paste class. (ie the pasteColumnWidth) Defining it just circumvents the bug.

    Can't find the MS link for the bug ... sorry.....

    Re: Cannot Run Recorded Code


    Re: VBA Coding practices

    Quote from Brandtrock

    With this type of arrangement do you have any opinion one way or the other as to whether Subs or Functions would go first?

    My thought is to list the Functions first as they are used in the Subs therefore, when they are used, the purpose of the function should be obvious to a subsequent coder. Probably nit picking, but I tend to read code top to bottom and not hop around using the drop downs until I am familiar with the code. Especially if it is written by someone else and I'm trying to amend it.

    I generally prefix my functions with a "f" to denote it is a function for easier reading plus macros / functions are listed aphabetically so drop down lists all functions grouped.

    also, what naming convention are you using ... using one is a g8 way to decipher your code latter as it should tell you just by looking @ it;
    what scope the function/sub/variable has , what type is is and a discriptive text of what it does etc.

    Re: Using UNC address to reference another file

    Hi Kelly

    You can't Change Dir or Drives using the UNC convention.
    You will need to resort to APIs for this..... adapt this routine...

    I think what you are talking about is vbs or java script

    eg if you write this in notepad and then save with extention .vbs you can run it to open an excel app.

    xl_file_full_path="C:\ExcelFiles\Useful\Sample.xls" 'Change here to your XL full path

    set appXL = CreateObject("Excel.Application")

    set appXL=nothing