Posts by spog00

    Re: Adding a new Row


    How about:


    Code
    Sub AddRow()
    
    
    Sheets("Sheet1").Rows(20).EntireRow.Insert Shift:=xlDown
    
    
    End Sub


    Hope this helps


    Alastair

    Re: Copy data


    Try this formula in the Answer rows:


    =INDEX($B2:$B6,MATCH(1,C2:C6,0))


    Then copy it across.


    Hope this helps


    Alastair

    Re: Delete Empyty Sheets


    try this:



    Hope this helps


    Alastair

    Re: Delete Empyty Sheets


    Try this (untested)



    Alastair

    Re: create a sheet with a macro


    Quote

    On the date thing, instead of 1692005 can't it be Sept 16?



    Hope this helps


    Alastair

    Re: Increment a For Loop



    Alastair

    Re: Disable Right Click selectionchange


    Cheers guys, this is excellent stuff!! Hadn't expected so many replies. Will test them and see... Unfortunately as has been pointed out, the selection change is activated before the right-click...But using OnTime is a stroke of genius! Will check it and see....


    Barry: Good thinking about the transparent textbox as well, I like it, however in this case, I have potentially hundreds of cells that are within the Right-click-able range, and the range is variable, so I fear using textboxes could get messy, thanks anyway :)


    Thanks,


    Alastair

    Re: A newbee



    Alastair


    PS, for future reference please use meaningful titles, or you thread will get locked ;)

    Re: Range Reference


    This really does work now... Not sure what was wrong earlier though...



    Hope this helps


    Alastair

    Re: Cell color formatting


    Quote

    I think i need to amend the select case to a nested if loop alongwith a while loop


    Shouldn't be necessary, and is much more complicated than it could be....


    Can you post an example? - Just as easy to stick to one thread...also gets frustrating and confusing if there are too many threads with the same subject ;)


    Alastair

    Re: macro to paste special value or format


    There is also a Paste Values toolbar button you can get...


    Right Click on a toolbar, then select Customise, select the Commands tab, then Select Edit from the menu on the left. Scroll down, and find the PasteValues button, then drag to the relevant place on your toolbar.


    Hope this helps


    Alastair

    Re: Add sheets Macro - check duplicate name


    I think this has already been covered but in a slightly different way:



    Hope this helps


    Alastair


    PS, Localan's code will work fine, but may be slow in a very big workbook...though it would have to be seriously large to notice anything ;) I have used something similar on workbooks with 300 sheets, and noticed nothing - admittedly they were empty sheets....Make your own mind up :)

    Re: Range Reference


    Ok, try a different tack:



    Hope this helps


    Alastair

    Re: Range Reference


    See if this works:


    Code
    Set maxcell = [COLOR=Red]Application.[/COLOR]WorksheetFunction.Max(Range(Cells(i * 11, 1), Cells(i * 11, 22)))


    Hope this helps


    Alastair