Posts by xl factor

    Hello experts,


    I am trying to automate a chrome packaged desktop trading application using selenium.
    I can find help for automation of chrome browser, but not for stand alone chrome package apps. If anyone could point me out to any resources on this will be great.


    Thank you and Regards,
    XL Factor

    Dear Kenneth,


    Thank you for your response.
    I am aware that sendkeys is always an option that one can fall back on in such situations.


    However I am still seeking to know weather or not, it is possible to control the Save as Dialog box already open by IE, just as it is controlled in the Excel environment.


    like:


    Code
    Dim xyz as FileDialog
    
    
    set xyz = (hWnd) ' handle number of the IE Save as window

    Hi,


    I am running a vba code from excel to navigate to a webpage and save an .xls report.
    I have managed to reach to the point where the "FileDialog(msoFileDialogSaveAs)" is opened by IE. I also am able to click the save button using sendMessage() API.
    However, I cant seem to figure how to change the name of the file.


    Is it possible to set the HWND of the already open dialogue box be set as FileDialog object and control it?


    Thank you.

    Hi,


    I need to count the number of rows if condition is true in 3 columns.
    Currently I am using the below formula, but I need to sum for almost 500 odd rows. How can this be done using array formulas.


    Any Ideas??


    Quote

    =IF(AND(B4="B1",F4="D",AM4="X"),1,0)


    Thanks and Regards,
    XL Factor

    Re: calculate range without looping


    Hi TheGlovner,


    The reason I was not in favour of a loop is because, the UDF's themselves have a loop, so I was trying to avoid looping inside a loop. The data on my sheet was very vastly spread out as I was initially planning a yearly Roster on the same sheet.


    I am now planning a monthly roster, with the UDF's in sheets, entered as formulas. When I hit Calculate sheet, It still takes a good 5 minuits to finish calculating.


    Is there a better way to achieve what I am trying to do?


    I have attached a sample workbook. Password for the VBA project is "formula"


    Thank you very much for your time. I really appreciate your help.




    Regards,
    xl factor.

    Re: calculate range without looping


    Hi TheGlovner,


    The reason I was not in favour of a loop is because, the UDF's themselves have a loop, so I was trying to avoid looping inside a loop. The data on my sheet was very vastly spread out as I was initially planning a yearly Roster on the same sheet.


    I am now planning a monthly roster, with the UDF's in sheets, entered as formulas. When I hit Calculate sheet, It still takes a good 5 minuits to finish calculating.


    Is there a better way to achieve what I am trying to do?


    I have attached a sample workbook.


    Thank you very much for your time. I really appreciate your help.


    Regards,
    xl factor.

    Hi All,


    Im trying to calculate a range using a UDF. It works fine for Range("F632").


    Code
    Range("F632:NF632").value = CountTitles(Range("B619"), Range("B605"), Range("F4:F502"), Range("B4:B502"))


    But when the UDF calculates for Range("G632"), I need to have the Range("G4:G502") instead of Range("F4:F502") and so on.


    I know this can be achieved by using


    Code
    .formula ="=enter formula"


    But im just wondering if the former approach is possible without having to run a loop??


    Any Ideas..


    Regards,
    XL Factor

    Dear Experts,


    The below code works fine when run from the worksheet object.



    How ever when I run it from a userform option button



    I get the subject error.
    The debugger highlights the following line

    Code
    ws.PageSetup.PrintArea = ws.Range(Cells(1, 1), lastCell).Address


    Any Ideas?

    Hi All,


    I'm running a vba code in the active sheet on a workbook. All sheet names are JAN, FEB, MAR and so on.
    What I need is a line of code to determine how many days are there in that month based on the name of the ActiveSheet.


    Any ideas? Below is the code.

    Re: Copy column values to another sheet based on input box value


    Hey Guys,


    Below is the final code that also retains the formatting.


    Re: Copy column values to another sheet based on input box value


    Dear Mumps,


    Thank you for your time and the above code. I am grateful for the same.
    The code works well to copy the data from Columns C & D into sheet2 columns A & B


    However, in sheet2 in column C the following text gets pasted throughout the column "RGB (252,213,180)". Whereas It needs to return the values & formats from the column of the Inputbox.


    I cant seem to figure from the code above as it is beyond my limited knowledge. Any ideas?

    Hi All,


    I have a workbook with 12 sheets named JAN, FEB, MAR etc.
    Each sheet is a Roster sheet that has dates in row 4 starting from F2 being 1, G2 being 2 and so on till AJ2 being 31.
    Column C & D have names and staff numbers.
    The last row to be used in this code is a merged row in column A that has the text "END OF ROSTERS" (Minus one row).


    Attached is a downsized version of the roster.


    I need a vba code to do the following:


    Bring on an input box and ask to enter a date (anything between 1 to 31).
    Based on the entry in the input box choose the correct column from F4 to AJ4 till the row in column A that has the text "END OF ROSTERS" (Minus one row).
    Loop the column to find if the cell interior color is RGB(252, 213, 180), if yes, then copy that value along with values in C & D in the same row, loop untill sheet1 has a merged row in column A that has the text "END OF ROSTERS" (Minus one row).


    Thank you.