Posts by adygelber

    Hey,


    Some tweak adjustments:



    If in cell B16 you have a full URL (path) like "C:\MyDoc.pdf" it should be open.


    For the rest of the code I am not so sure of the real meaning and purpose.


    If you need further assistance please provide more details.


    Cheers,
    Adrian B.

    Hello,
    Your second solution should work, even if it seems a little bit hard-coded..therefore something like this:


    Code
    If cbx1.Value = False Then
            Sheets("Sheet2").Columns(1).EntireColumn.Hidden = True
        Else
            Sheets("Sheet2").Columns(1).EntireColumn.Hidden = False
        End If


    Of course, you can use an object like shtFinancial instead of Sheets("Sheet2"), if it is correctly Set


    eg.

    Code
    Dim shtFinancial as worksheet
    Set shtFinancial=Sheets("MySheet")


    Please develop a little bit your needs or attach a sample workbook if you need further assistance.


    Cheers,
    Adrian B.

    Re: Modification in code


    Hey,


    Sorry for the late reply...


    Try this and let me know if it is what you need:



    Cheers,
    Adrian B.

    Re: Modification in code


    Or:

    Code
    Dim myrange, mycell As Range
        Set myrange = Sheets("Sheet1").Range("F3", Range("F65536").End(xlUp))
        
        For Each mycell In myrange
            If WorksheetFunction.CountA(Range(mycell.Address & ":" & mycell.Offset(0, 2).Address)) = 3 Then
                mycell.Offset(0, 3) = mycell.Value & " " & "/" & " " & mycell.Offset(0, 1).Value & " " & "/" & " " & mycell.Offset(0, 2).Value
            End If
        Next mycell

    Re: Modification in code


    Hey,


    The simple way:


    Code
    For Each mycell In myrange 
            If mycell.Value<>"" and mycell.Offset(0, 1).Value<> "" and mycell.Offset(0, 2).Value <> "" then
                mycell.Offset(0, 3) = mycell.Value & " " & "/" & " " & mycell.Offset(0, 1).Value & " " & "/" & " " & mycell.Offset(0, 2).Value 
            End If
        Next mycell

    Re: Applying VLookup in VBA to Filtered Data


    Hey,


    Try this and let me know:



    If you have an Subscript Out of Range error on your VLOOKUP please check your ranges.


    Cheers,
    Adrian B.

    Re: CASE not firing


    Hey,


    Try to put the code on the Change event of your textbox, like this:



    Tell me if this worked.


    Cheers,
    Adrian B.

    Re: Shorter vba code


    Hello IvCin,


    Two ways to accomplish:


    1. On Error Resume Next before With... and On Error GoTo 0 after End With


    2. An workaround:



    It's up to you :)


    Cheers,
    Adrian B.

    Re: Code to calculate total length installed based on number of pages that are entere


    Hey,


    You could try something like this:



    Every time when you will run the code it will collect data from all the worksheets but MAIN.
    Let me know if this worked.


    Cheers,
    Adrian B.

    Re: Shorter vba code


    Hey,


    Try this way:



    Cheers,
    Adrian B.

    Re: copy cell from sheet2 with criterias in sheet1


    Hey,


    I think that you will have to clarify a little bit the problem...


    1. You spoke about sheet2, sheet1, sheet4, but in the attached WB I can see only two sheets: Automation and Population.
    2. You said "Add 4 rows below cell 2". Well, "cell 2" is not quite a reference and can be interpreted. Maybe it will make more sense if you explain why do you need some rows.
    3. You said "Add year (B7 +1) in Time column". Ok, so you need to increment the year 2013 but where to store the incremented values in the TIME column? And why to do this?
    4. Step3 and Step4 are also unclear for me...


    Maybe is my fault but I can't really see the logic behind this application.
    I can't understand what you are trying to achieve and I am pretty sure that your question can find an answer if the logic behind is well defined.


    Cheers,
    Adrian B.

    Re: userform combobox populated from two columns of a table


    Hello again,


    I clearly misunderstood you request.


    Please paste the above code in your userform code area:



    Here is the sample workbook:
    forum.ozgrid.com/index.php?attachment/72281/


    Cheers,
    Adrian B.