LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Paste Problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
paste problem [email protected] Excel Programming 5 March 30th 07 03:08 AM
Problem with paste DonT Excel Worksheet Functions 0 March 29th 06 11:56 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
CUT & PASTE PROBLEM Todd Excel Discussion (Misc queries) 1 March 10th 05 12:45 AM


All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"