Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default vba 2003 cut copy animated border

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default vba 2003 cut copy animated border

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default vba 2003 cut copy animated border

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default vba 2003 cut copy animated border

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default vba 2003 cut copy animated border

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
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
Dynamically set border in excel 2003? veek New Users to Excel 4 July 29th 08 09:12 PM
Selected cells do not show animated border nadchris Excel Discussion (Misc queries) 5 May 16th 08 02:52 PM
Copy & Cut different animated boundaries Sam Prince Excel Worksheet Functions 0 August 14th 06 11:44 AM
Excel 2003- animated gifs won't work? mtt14 Excel Discussion (Misc queries) 0 May 29th 06 09:34 PM
How copy format, font, color and border without copy/paste? Michel[_3_] Excel Programming 1 November 5th 03 04:43 PM


All times are GMT +1. The time now is 04:13 PM.

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"