Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had a problem of Borders disappearing when I Cut data from one area of a
worksheet and Pasting it somewhere else. Someone just showed me how to create a macro that would display borders in cells that would remain when I Cut data from one area and Paste somewhere else. ***MACRO*** Private Sub Worksheet_SelectionChange(ByVal Target As Range) With Range("B") With .Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 55 End With With .Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 55 End With With .Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 55 End With With .Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 55 End With With .Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 55 End With With .Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = 55 End With End With End Sub To get this to work name the range where the grids should be to B. You can change the LineStyle, Weight, or ColorIndex to suit your needs. ********** The problem I'm having now is that when I Cut the data and click on the area I want to Paste it, the Paste option is unavaiable and so is the Undo. However, when I display the Clipboard, the Paste All is available and when I click that, the data paste where I want it and the Paste option becomes available again on the Toolbar and I can Paste the data again and again. But when I try Cut and Paste of some other data, the Paste option beomes unavailable once again. If I Cut from the worksheet with the Macro and go to paste that data in another worksheet, it works. What's going on??? HELP!!! -- He Who Plans for this Life, but Not for Eternity is Wise for a Moment, but a FOOL FOREVER!!! Where Will YOU Spend ETERNITY??? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
paste problem | Excel Programming | |||
Problem with paste | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
CUT & PASTE PROBLEM | Excel Discussion (Misc queries) |