Posts by adidas

    hi can i return a recordest into a Selection.FormulaArray, like this:


    Thanks guys,
    Andrés.

    hi all, question there is a way to this:
    create a function that returns a ADODB.Recordset and that function is going to be call in a form in the click of a button, and the results from recordset are going to be displayed using the Selection.FormulaArray.


    Thanks,
    Andrés.

    Hi all,
    My question is, how i can display different values using the Selection.FormulaArray, ok look at my code:


    Now the function i call:

    Code
    1. Public Function multiplie_value(valor As Integer, multiplo As Integer) As Integer
    2. multiplie_value = Val(valor) * multiplo
    3. End Function


    thats an example. so the real question is i create a form, the user enter some values to search to a database, the user select an area(a range) where they want the data to be display, but i dont how to display that info that is coming from the database in the range that the user selected. The info displayed in the range should look like a tabular report, column headers, etc.


    Thanks in advance.


    Andrés.


    Peace to all my bros!!!!


    Hi i need to desing a form so the user enter some values to search to a database, the user select an area(a range) where they want the data to be display, but i dont how to display that info that is coming from the database in the range that the user selected. The info displayed in the range should look like a tabular report, column headers, etc


    Thanks,
    Andrés. :cool:

    Hi i am getting an error when i try to read the info in a recordset that is coming from a store procedure, the error is:


    "Operation is not allowed when the object is close". what can be. I am trying to check if the name of the recordset is not EOF.


    Thanks,
    Andres.

    Returning Recordset


    hi can i return a recordest into a Selection.FormulaArray, like this:


    Thanks guys,
    Andrés.

    Working With Recordset In A Range Of Cells


    Hi to all the guys,
    ok here my question, the user wants to make a query to a certain database. To return the result from the query i am using a store procedure. the SP needs two parameters. To enter the parameters the user can use a form created in Excel or can put the paramters in any cell of the sheet. then the user select a range of cells, for example they whant the result to displayed in the of A1:C7.So how i capture those parameters that are in any cell of the sheet and how i pass them to the store procedure and then how i put that results in the area that the user select(A1:C7). i am using a recordset to return the results and a function. another feature is that if the user change the value of the paramter that are in the cell and click enter, the results needs to be refresh inmediatly, so the user dont needs to open again the form.


    Thanks a lot,
    Andrés.

    Re: Display A Recordset


    ok look i have this function in a module


    i have this code in a button in a form:


    that code display me the data inside teh recordset. so the problem is that i want to be display the function as a fomula array. Wy that because if a user change the value that has entered in a cell, the data displayed by the recordset should be refreshed and display the new result. the value that the user enter in the cell is the parameter i need to send to the store procedure.


    Thanks for all,
    Andres.

    Re: Display A Recordset


    hi norie, look the user select a range in excel(for example from A1:C7) so i want to put in that range the data. The range is dinamic i am using a refedit control to capture the range, but i want to do that with a function and that function is going to be a formulaarray.


    example of formula array

    Code
    1. Selection.FormulaArray = "=multiplie_value(""" & x & """, """ & y & """)"


    the function si going to return a recordset(or if there is another way), so if u click on any cell where the data is displayed, in the fx bar should look like this:{=multiplie_value(10,5)}


    Thanks,
    Andres

    Display A Recordset


    hi all, question there is a way to this:
    create a function that returns a ADODB.Recordset and that function is going to be call in a form in the click of a button, and the results from recordset are going to be displayed using the Selection.FormulaArray.


    Thanks,
    Andrés.

    Re: Display Data From A Database


    hi will thanks. Look i am software developer, i know visual basic, i know ado, i know .net , sql server, etc, but this is my first time with Excel. I just need a manual or something like that will be nice. I need to know exactly how to put data from a database in a range that the user select, i am using the refedit control to select the region where i want to display the data.


    Thanks for all.
    Andrés.

    Hi all,
    My question is, how i can display different values using the Selection.FormulaArray, ok look at my code:


    Now the function i call:

    Code
    1. Public Function multiplie_value(valor As Integer, multiplo As Integer) As Integer
    2. multiplie_value = Val(valor) * multiplo
    3. End Function


    thats an example. so the real question is i create a form, the user enter some values to search to a database, the user select an area(a range) where they want the data to be display, but i dont how to display that info that is coming from the database in the range that the user selected. The info displayed in the range should look like a tabular report, column headers, etc.


    Thanks in advance.


    Andrés.


    Peace to all my bros!!!!


    Hi i need to desing a form so the user enter some values to search to a database, the user select an area(a range) where they want the data to be display, but i dont how to display that info that is coming from the database in the range that the user selected. The info displayed in the range should look like a tabular report, column headers, etc


    Thanks,
    Andrés. :cool:

    hi my question is how i determine the start of the range and the end of the range. Look the example:

    Code
    1. Range("D3:G8").Select


    So how dynamically knows that the region starts in D3 and finish in G8?


    theres is a function that returns me that??


    Thanks in advance :cool: .


    Waiting for answers i am new in excel but not new with visual basic.