Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have implemented my own cut/copy paste operations on a particular worksheet.
I would like the border around my cut/copied selection to appear animated (flashing, running) like the the border does when doing a standard cut/copy selection operation. I've looked at the Borders property of the Range collection and everywhere else I can think but cannot find a line style or other property to set to make this happen. Any help will be greatly appreciated. Thanks, Jeff Higgins |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It sounds like something is clearing the cutcopymode in your code.
activesheet.range("c9:d13").copy Turns on those marching ants for me. But if I clear the clipboard with something like: application.cutcopymode = false (or even a different command that clears the clipboard), they disappear. Jeff Higgins wrote: I have implemented my own cut/copy paste operations on a particular worksheet. I would like the border around my cut/copied selection to appear animated (flashing, running) like the the border does when doing a standard cut/copy selection operation. I've looked at the Borders property of the Range collection and everywhere else I can think but cannot find a line style or other property to set to make this happen. Any help will be greatly appreciated. Thanks, Jeff Higgins -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave,
I appreciate your quick reply, thanks. Yes, I'm clearing app.cutcopymode I suppose when I use CancelDefault = True (see below). I've tried using app.cutcopymode = xlCut etc.in my CutMenuCommand_Click etc. sub but doesn't work. I can change selection border using app.selection.borders(xlEdgeBottom).color= rgb(255,0,0) app.selection.borders(xlEdgeBottom).linestyle = xlDouble etc. etc. but cannot get moving border. May be could set up timer and change linestyles rapidly but seems like a lot of trouble:( May not be possible to achieve "special" moving border without a lot of trouble:( Was hoping for simple property setter:-) Thanks, Jeff ------------------------------------------------- In my "EventClass" class module I have Option Explicit Public WithEvents App As Application Public CmdBars As CommandBar Public WithEvents CutMenuCommand As _ Office.CommandBarButton Public WithEvents CopyMenuCommand As _ Office.CommandBarButton Public WithEvents PasteMenuCommand As _ Office.CommandBarButton Private Sub CutMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnCut End Sub Private Sub CopyMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnCopy End Sub Private Sub PasteMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnPaste End Sub -------------------------------------------------- In my "ThisWorkbook" workbook object module I have Private Sub Workbook_Open() Call Init_Workbook End Sub -------------------------------------------------- In my "WorksheetFunctions" standard module Option Explicit Public AppClass As New EventClass Public CallerIsWorksheetChange As Boolean Public Sub Init_Workbook() Set AppClass.App = Application Set AppClass.CmdBars = _ AppClass.App.CommandBars("Worksheet Menu Bar") Set AppClass.PopupCmdBars = _ AppClass.App.CommandBars("Cell") Set AppClass.CutMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("Cu&t") Set AppClass.CopyMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("&Copy") Set AppClass.PasteMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("&Paste") End Sub --------------------------------------------------- In my "UserInterfaceFunctions" standard module Public Sub OnCut() 'Do some stuff here End Sub Public Sub OnCopy() 'Do some stuff here End Sub Public Sub OnPaste() 'Do some stuff here End Sub "Dave Peterson" wrote: It sounds like something is clearing the cutcopymode in your code. activesheet.range("c9:d13").copy Turns on those marching ants for me. But if I clear the clipboard with something like: application.cutcopymode = false (or even a different command that clears the clipboard), they disappear. Jeff Higgins wrote: I have implemented my own cut/copy paste operations on a particular worksheet. I would like the border around my cut/copied selection to appear animated (flashing, running) like the the border does when doing a standard cut/copy selection operation. I've looked at the Borders property of the Range collection and everywhere else I can think but cannot find a line style or other property to set to make this happen. Any help will be greatly appreciated. Thanks, Jeff Higgins -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There's nothing built into the borders that would allow that marquee effect.
Maybe you could copy the range again. Jeff Higgins wrote: Dave, I appreciate your quick reply, thanks. Yes, I'm clearing app.cutcopymode I suppose when I use CancelDefault = True (see below). I've tried using app.cutcopymode = xlCut etc.in my CutMenuCommand_Click etc. sub but doesn't work. I can change selection border using app.selection.borders(xlEdgeBottom).color= rgb(255,0,0) app.selection.borders(xlEdgeBottom).linestyle = xlDouble etc. etc. but cannot get moving border. May be could set up timer and change linestyles rapidly but seems like a lot of trouble:( May not be possible to achieve "special" moving border without a lot of trouble:( Was hoping for simple property setter:-) Thanks, Jeff ------------------------------------------------- In my "EventClass" class module I have Option Explicit Public WithEvents App As Application Public CmdBars As CommandBar Public WithEvents CutMenuCommand As _ Office.CommandBarButton Public WithEvents CopyMenuCommand As _ Office.CommandBarButton Public WithEvents PasteMenuCommand As _ Office.CommandBarButton Private Sub CutMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnCut End Sub Private Sub CopyMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnCopy End Sub Private Sub PasteMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnPaste End Sub -------------------------------------------------- In my "ThisWorkbook" workbook object module I have Private Sub Workbook_Open() Call Init_Workbook End Sub -------------------------------------------------- In my "WorksheetFunctions" standard module Option Explicit Public AppClass As New EventClass Public CallerIsWorksheetChange As Boolean Public Sub Init_Workbook() Set AppClass.App = Application Set AppClass.CmdBars = _ AppClass.App.CommandBars("Worksheet Menu Bar") Set AppClass.PopupCmdBars = _ AppClass.App.CommandBars("Cell") Set AppClass.CutMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("Cu&t") Set AppClass.CopyMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("&Copy") Set AppClass.PasteMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("&Paste") End Sub --------------------------------------------------- In my "UserInterfaceFunctions" standard module Public Sub OnCut() 'Do some stuff here End Sub Public Sub OnCopy() 'Do some stuff here End Sub Public Sub OnPaste() 'Do some stuff here End Sub "Dave Peterson" wrote: It sounds like something is clearing the cutcopymode in your code. activesheet.range("c9:d13").copy Turns on those marching ants for me. But if I clear the clipboard with something like: application.cutcopymode = false (or even a different command that clears the clipboard), they disappear. Jeff Higgins wrote: I have implemented my own cut/copy paste operations on a particular worksheet. I would like the border around my cut/copied selection to appear animated (flashing, running) like the the border does when doing a standard cut/copy selection operation. I've looked at the Borders property of the Range collection and everywhere else I can think but cannot find a line style or other property to set to make this happen. Any help will be greatly appreciated. Thanks, Jeff Higgins -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dave,
Yes, that works. Thanks so much for your help. I'm not using the clipboard for my paste source anyway, so I'm sure it won't hurt. I began this undertaking of implementing my own cut/copy/paste operations because I noticed that if a selection was cut from my "very pretty" worksheet and pasted to another area on the same worksheet the "pretty" formatting would also be cut and pasted onto another "pretty" formatted area and my sheet would become "not" pretty. Using cut/copy/paste on this particular sheet is a fairly intuitive action but I could not trust myself or my users to use paste special contents only, so I have begun what has become an enormously involved process. Thanks to you and others in this group I have very nearly got what I want. A few pesky bugs surely remain. Anyway, Thanks for your help, it's much appreciated. Jeff Higgins "Dave Peterson" wrote: There's nothing built into the borders that would allow that marquee effect. Maybe you could copy the range again. Jeff Higgins wrote: Dave, I appreciate your quick reply, thanks. Yes, I'm clearing app.cutcopymode I suppose when I use CancelDefault = True (see below). I've tried using app.cutcopymode = xlCut etc.in my CutMenuCommand_Click etc. sub but doesn't work. I can change selection border using app.selection.borders(xlEdgeBottom).color= rgb(255,0,0) app.selection.borders(xlEdgeBottom).linestyle = xlDouble etc. etc. but cannot get moving border. May be could set up timer and change linestyles rapidly but seems like a lot of trouble:( May not be possible to achieve "special" moving border without a lot of trouble:( Was hoping for simple property setter:-) Thanks, Jeff ------------------------------------------------- In my "EventClass" class module I have Option Explicit Public WithEvents App As Application Public CmdBars As CommandBar Public WithEvents CutMenuCommand As _ Office.CommandBarButton Public WithEvents CopyMenuCommand As _ Office.CommandBarButton Public WithEvents PasteMenuCommand As _ Office.CommandBarButton Private Sub CutMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnCut End Sub Private Sub CopyMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnCopy End Sub Private Sub PasteMenuCommand_Click(ByVal Ctrl As _ Office.CommandBarButton, CancelDefault As Boolean) CancelDefault = True Call OnPaste End Sub -------------------------------------------------- In my "ThisWorkbook" workbook object module I have Private Sub Workbook_Open() Call Init_Workbook End Sub -------------------------------------------------- In my "WorksheetFunctions" standard module Option Explicit Public AppClass As New EventClass Public CallerIsWorksheetChange As Boolean Public Sub Init_Workbook() Set AppClass.App = Application Set AppClass.CmdBars = _ AppClass.App.CommandBars("Worksheet Menu Bar") Set AppClass.PopupCmdBars = _ AppClass.App.CommandBars("Cell") Set AppClass.CutMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("Cu&t") Set AppClass.CopyMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("&Copy") Set AppClass.PasteMenuCommand = _ AppClass.CmdBars._ Controls("&Edit").Controls("&Paste") End Sub --------------------------------------------------- In my "UserInterfaceFunctions" standard module Public Sub OnCut() 'Do some stuff here End Sub Public Sub OnCopy() 'Do some stuff here End Sub Public Sub OnPaste() 'Do some stuff here End Sub "Dave Peterson" wrote: It sounds like something is clearing the cutcopymode in your code. activesheet.range("c9:d13").copy Turns on those marching ants for me. But if I clear the clipboard with something like: application.cutcopymode = false (or even a different command that clears the clipboard), they disappear. Jeff Higgins wrote: I have implemented my own cut/copy paste operations on a particular worksheet. I would like the border around my cut/copied selection to appear animated (flashing, running) like the the border does when doing a standard cut/copy selection operation. I've looked at the Borders property of the Range collection and everywhere else I can think but cannot find a line style or other property to set to make this happen. Any help will be greatly appreciated. Thanks, Jeff Higgins -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamically set border in excel 2003? | New Users to Excel | |||
Selected cells do not show animated border | Excel Discussion (Misc queries) | |||
Copy & Cut different animated boundaries | Excel Worksheet Functions | |||
Excel 2003- animated gifs won't work? | Excel Discussion (Misc queries) | |||
How copy format, font, color and border without copy/paste? | Excel Programming |