Posts by gollem

    Re: create a new workbook



    This lines are confusing:

    Code
    If Range("l1").Value <> "" Then Range("l1").Value = CDate(Date) 
    asdate = Range("l1").Value 'date entered by user


    You say date entered by user, but if a value is put in => the current date is filled in.... just a remark

    Re: Print worksheets based on information in column


    Hi,


    I'm not 100% sure what you want to do. But to print a sheet based on a cell-value:


    Code
    Sheets(range("I1").value).PrintOut


    If you write a loop you can make it flexibel, loop through the column and print every name.

    Hi,


    I've a table(colA) with for example:


    A
    A
    B
    B
    1000
    2000
    C
    A
    B
    5000
    C
    C


    I would like a formule that counts every item onces without the duplicates.
    So every unique item should be counted, the result for the example above should be 6.


    Hope this is possible with a simple formule.


    Gr,


    Gollem

    Re: Importing Input Data from Excel to Visual C++


    What exactly are you trying to do? Do you want to add data to excel and read data from excel with C++. If you don't have a basic understanding of C++ I wouldn't recommend it, however if you have experience with VB, you can write the program in VB.net and then convert it to C++. It's possible since .net version.

    Re: Dynamic range formule


    Thanks for the reply Bob. :smile:


    It seems to work great, but can you explain a little bit what the formule does, how it works. I'm not figuring it out :confused:


    Thanks

    Hi,


    I've a little problem with my formule in Excel. I 've checked the explanation of dynamic ranges on the site here but I can't seem to find a solution myself.


    I have a little table with data that will be filled in and change a lot. Now I want a table next to it with a result of a filter that also can change. All this has to be done with formules, I can solve this problem with VBa but I would like to learn how I can solve this with formules.


    I've uploaded a small example that shows my problem and the desired outcome.


    Thanks for the help and support in advance.


    Gr,


    Gollem

    Re: &quot;Type mismatch&quot;


    According to me this does the same, I could be wrong:


    Code
    "SELECT CUSTINVOICETRANS.QTY " & Chr(13) & "" & Chr(10) & _ 
    "FROM AXDB.Bmssa.CUSTINVOICETRANS CUSTINVOICETRANS" & Chr(13) & "" & Chr(10) & _ 
    "WHERE CUSTINVOICETRANS.ITEMID = 'MFD101' and CUSTINVOICETRANS.ITEMID  = 'RMI01'

    Re: Set Focus on Combobox


    Quote

    allow the user to select from the box and then return control back to the regular code


    Hi, small remark:


    I think you have to write 2 procedures instead of 1 program that should interact. The first program should do the things without the combobox and the second should trigger if the user selects an item of the box. That way the box doesn't have to be activated.


    (By the way I don't know how you activate the box on a sheet. selecting yes, but activating no)

    Re: Determine if a userform is loaded


    I don't know if this is the best way, but you can use a public variable to do this. When the form is loaded you set your variable for example to 1, then you can check if the form is loaded or not. When the form is unloaded you set the variable to 0.

    Re: populate textbox with spreadsheet range


    Perhaps this works:


    Code
    Dim ExcelWB  As Excel.workbook 
        Dim ExcelSH As Excel.worksheet 
        Dim ExcelApp As Excel.Application 
        Set ExcelApp = New Excel.Application 
        Set ExcelWB = ExcelApp.Workbooks.Open("C:\Documents and Settings\Owner\Desktop\TheEstimator\Jobs\test.xls") 
        Set ExcelSH = ExcelWB.Sheets("Main Roof") 
         
        TextBox1.Value = ExcelApp.ExcelWB.ExcelSH.Range("c43").value



    Something shorter:


    Code
    Dim ExcelApp As Excel.Application 
        Set ExcelApp = New Excel.Application 
        ExcelApp.Workbooks.Open("C:\Documents and Settings\Owner\Desktop\TheEstimator\Jobs\test.xls") 
         
        TextBox1.Value =  ExcelApp.activeworkbook.sheets("Main Roof").Range("c43").value