Posts by Thor


    I need to converst 32 bit IEEE number read from binary file ( in form of 4 bytes ) to a double.
    I also need function that can convert float number to 4 byte IEEE representation so I can write it back to binary file.

    Do You know any code that I can use to solve my problem ?


    Re: Check If Array Is Set.

    Well I need dynamic array.
    So I dont set it size at the beginning because well I don't know how big array I need.
    Then when I populate array I need position of last element. But if its not initialize UBound will throw error.

    Of course I can get around this in few ways but having some straight forword way to check if array is initialized would simplyfie code (a little).
    Plus I thought that this should be possible but I just couldn't find it so I just wanted to know.
    But if this is not possible in VBA then no problem, really.
    It is just bugging me.

    Re: Check If Array Is Set.

    Is array checks if variable is array. It doesnt check if it was initialized.

    Dim myArray() as String
    msgbox IsArray( my Array )

    This will return true.

    I would like to know if there is a straight forward way to check if dynamic array is set (initialized)?
    Is Nothing doesnt work with arrays and I dont want to use On Error GoTo becouse I dont like making jumps inside code.
    Sorry for this simple question but there is nothing about this in book i use and I couldnt find it in this forum.

    Re: Put Images Into ComboBox

    Does this ImageCombo needs some other special treatment?

    When i put more of this objects excell has a tandancy to crash.
    It always crashes when i close excel.
    Debuger told me that excel try to work on adres 0 so something is really off.

    Re: List(combobox) With Images

    Yea this looks good. Thanks.
    But i have trouble to make it work.
    I create ImageList and then ImageCombo but i cant get images in combo.
    I set AutoLoad to True but it didnt help. I can see images fine in ImageList.
    Could someone who used it before take a look at sample i included?

    Thanks in advance.

    You can place in cell something that looks like ComboBox and contains list of options that you can choose.
    I was wondering if there is a way to do the same but with icons/images instead of text?
    And i dont mean form just excel sheet.

    Thanks for any help.

    Re: Changing Multiple Sheets At Once (vba)

    Hehe. Yea i did a loop.
    This is something i thought of first by instinct (as i come from c++ )
    but its more efficient to use build in function then to use lopps in VBA.
    And it puzzels me why this code doesnt work (well in vba many things does not work intuitive, i dont know if its just me or maybe lack of good documentation).

    And ofcource i have more then those 4 sheets so adding rows to all sheets was not good option for me.

    This is my problem.
    I have 4 sheets that use the same template.
    Now user has option to add new Rows to it.
    There are few predefined row layouts (using diffrent lists as column values).

    This is code that i tryed to use:
    Only adding new row and insertin its name (i didnt try formating cells yet since i cant get this simple stuff to work).

    But this code only enters new row in first sheet (Week One).
    Other sheets are unchnged.

    EDIT: TextBox value is enterd in 4 sheets.

    Re: Adding Data To Database Odbc Query

    Thanks guys. I got this to work. I really apriciate your help.
    One more thing, do you know good preferebly downloadable documentation for ADO (mostly interested in ADODB)?
    Using msdn always gives me a headake. I find this site extrimly difficult to navigate.

    Re: Adding Data To Database Odbc Query

    Ok really dump question.

    Dim cbr As ADODB.Connection
        Dim dbr As ADODB.Recordset
        Dim query As String

    On line one i am geting user-type not defined error.
    What should i do to convince excel 2000 to use ADODB objects.

    Re: Adding Data To Database Odbc Query

    I thought this will be the answer becouse i couldnt find anything usefull in ODBC.
    But its always better to ask then to miss something just becouse you cant find it.
    I saw examples of using ADO and i will use it.

    Thanks guys.

    I can show data from database using ODBC and query from excel.

    Is it possible to make such query that will add data to database?
    Modyfie data in database?
    Or should I use ADODB and VBA to do this.