Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Really Need Help: side effect clears clipboard!!!

Hi,

I have a procedure (shown below) which makes a Controls Toolbar button
vizible if "A1" is selected. An unfortunate side effect is that having this
procedure kills the ability to copy and paste -- if something had been
selected and copied, it disappears once any other cell is clicked.

Can anyone suggest a work around?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$A$1" Then
AddFundButton.Visible = True
Else
AddFundButton.Visible = False
End If
End Sub


Many thanks in advance,

Bura
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Really Need Help: side effect clears clipboard!!!

odd. it works for me.
i had to change the AddFundButton t
ActiveSheet.Shapes("AddFundButton") but that is the only thing
modified. i was able to copy from the page with the button to anothe
sheet, and from a sheet to the button page, and activate/deactivate th
button in-between. I'm using excel 97 on win 98.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$A$1" Then
ActiveSheet.Shapes("AddFundButton").Visible = True
Else
ActiveSheet.Shapes("AddFundButton").Visible = False
End If
End Sub

it might have something to do with the "Selection change" since you'l
be doing that when you pick a target range for your copied cells. tr
tying the event to something else, like doubleclick... in that case
you might want to eliminate your Else statement, and have the butto
toggle on/off when A1 is doubleclicked, see if this will work fo
you...

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range
Cancel As Boolean)
If Target.Address = "$A$1" Then
With ActiveSheet.Shapes("AddFundButton")
.Visible = Not .Visible
End With
End If
End Su

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Really Need Help: side effect clears clipboard!!!

Hi
not tested but give it a try

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
static status
If Target.Address = "$A$1" Then
AddFundButton.Visible = True
status = True
Elseif status
AddFundButton.Visible = False
status = False
End If
End Sub



--
Regards
Frank Kabel
Frankfurt, Germany

Bura Tino wrote:
Hi,

I have a procedure (shown below) which makes a Controls Toolbar

button
vizible if "A1" is selected. An unfortunate side effect is that
having this procedure kills the ability to copy and paste -- if
something had been selected and copied, it disappears once any other
cell is clicked.

Can anyone suggest a work around?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$A$1" Then
AddFundButton.Visible = True
Else
AddFundButton.Visible = False
End If
End Sub


Many thanks in advance,

Bura


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Really Need Help: side effect clears clipboard!!!

Hi
not tested but give it a try

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
static status
If Target.Address = "$A$1" Then
AddFundButton.Visible = True
status = True
Elseif status
AddFundButton.Visible = False
status = False
End If
End Sub


This does help, but I still can't paste TO or FROM A1.

(What's MS's design thinking behind this feature of clipboard clearing
upon certain actions?)


--
Regards
Frank Kabel
Frankfurt, Germany

Bura Tino wrote:
Hi,

I have a procedure (shown below) which makes a Controls Toolbar

button
vizible if "A1" is selected. An unfortunate side effect is that
having this procedure kills the ability to copy and paste -- if
something had been selected and copied, it disappears once any other
cell is clicked.

Can anyone suggest a work around?

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Address = "$A$1" Then
AddFundButton.Visible = True
Else
AddFundButton.Visible = False
End If
End Sub


Many thanks in advance,

Bura

Reply
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
launching Excel clears clipboard Richard Excel Discussion (Misc queries) 0 July 17th 08 01:51 PM
How to permantently hide clipboard pane on the right side of Word/Excel 2003? Goran Ivanic Excel Discussion (Misc queries) 1 May 7th 08 10:37 PM
How2 setup one page distribution report side by side results sailorgirl Charts and Charting in Excel 0 August 20th 07 09:14 PM
Strange behaviour - loading Excel clears Clipboard Trevor Shuttleworth Excel Discussion (Misc queries) 1 August 19th 06 10:04 PM
Display columns side by Side in the Data Area of a Pivot table Sue Excel Discussion (Misc queries) 1 March 21st 06 02:12 AM


All times are GMT +1. The time now is 05:07 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"