A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Marching ants" around copied cell



 
 
Thread Tools Display Modes
  #11  
Old January 17th, 2009, 01:34 AM posted to microsoft.public.excel.newusers
Simon Lloyd[_78_]
external usenet poster
 
Posts: 1
Default "Marching ants" around copied cell


Press and hold Alt & F11, the VBE (visual basic editor) will open, on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use Alt+F11 as
before and instead of double clicking Thisworkbook, right click in that
area, choose Insert and then choose Module, then you can paste your code
in there. The best way to learn is to record a macro while you are doing
a task and then go back and take a look at the generated code, it's true
to say that you will see a lot of code that is excess to requirements
but it will give you a basic idea on how things are structured.Riccol;186154 Wrote:
I've never used a Macro before. The spreadsheets I make are mostly just
invoices and ledger stuff for my small (very small) business, no real
complicated formulas or anything, thus I've never tried learning about
Macros.

So the codes posted to kill the ants are greek to me, I don't even know
where I'm supposed to type them. But I'd like to learn what to do with
them if anyone has the time to explain it.

Thanks everyone for your suggestions.

RC

T. Valko wrote:
I use the "Ant_Killer" method!

To the OP:

Do you use macros for anything and if so do you have any of them

stored in a
file called Personal.xls?



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=50724

  #12  
Old January 17th, 2009, 01:49 AM posted to microsoft.public.excel.newusers
Riccol
external usenet poster
 
Posts: 21
Default "Marching ants" around copied cell

Thanks, Simon. I'm going to tackle your instructions in the AM and
report back after. (Your method sounds especially good as you say it
kills the ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will open, on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use Alt+F11 as
before and instead of double clicking Thisworkbook, right click in that
area, choose Insert and then choose Module, then you can paste your code
in there. The best way to learn is to record a macro while you are doing
a task and then go back and take a look at the generated code, it's true
to say that you will see a lot of code that is excess to requirements
but it will give you a basic idea on how things are structured.

  #13  
Old January 17th, 2009, 02:13 AM posted to microsoft.public.excel.newusers
Gord Dibben
external usenet poster
 
Posts: 20,252
Default "Marching ants" around copied cell

The macros provided by Biff and myself are just manually run macros and
should be copied into a General/Standard module, not event type code which
would go into Thisworkbook or a worksheet module.

If you're not familiar with VBA and macros, see David McRitchie's site for
more on "getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

or Ron de De Bruin's site on where to store macros.

http://www.rondebruin.nl/code.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.

I would recommend not using the SendKeys macro.........SendKeys can be a
little flaky. I've never noticed but better safe than sorry.


Gord Dibben MS Excel MVP

On Fri, 16 Jan 2009 19:09:14 -0500, Riccol wrote:

I've never used a Macro before. The spreadsheets I make are mostly just
invoices and ledger stuff for my small (very small) business, no real
complicated formulas or anything, thus I've never tried learning about
Macros.

So the codes posted to kill the ants are greek to me, I don't even know
where I'm supposed to type them. But I'd like to learn what to do with
them if anyone has the time to explain it.

Thanks everyone for your suggestions.

RC

T. Valko wrote:
I use the "Ant_Killer" method!

To the OP:

Do you use macros for anything and if so do you have any of them stored in a
file called Personal.xls?


  #14  
Old January 17th, 2009, 03:45 AM posted to microsoft.public.excel.newusers
T. Valko
external usenet poster
 
Posts: 15,759
Default "Marching ants" around copied cell

The method that Simon is describing can only be used in the workbook in
which you place the code.

The method I use (which takes more work to setup) can be used in any
workbook.

--
Biff
Microsoft Excel MVP


"Riccol" wrote in message
...
Thanks, Simon. I'm going to tackle your instructions in the AM and report
back after. (Your method sounds especially good as you say it kills the
ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will open, on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use Alt+F11 as
before and instead of double clicking Thisworkbook, right click in that
area, choose Insert and then choose Module, then you can paste your code
in there. The best way to learn is to record a macro while you are doing
a task and then go back and take a look at the generated code, it's true
to say that you will see a lot of code that is excess to requirements
but it will give you a basic idea on how things are structured.



  #15  
Old January 17th, 2009, 06:02 AM posted to microsoft.public.excel.newusers
Simon Lloyd[_80_]
external usenet poster
 
Posts: 1
Default "Marching ants" around copied cell


Would that be the same if the code was saved in PERSONAL.xls?T. Valko;186308 Wrote:
The method that Simon is describing can only be used in the workbook in
which you place the code.

The method I use (which takes more work to setup) can be used in any
workbook.

--
Biff
Microsoft Excel MVP


"Riccol" wrote in message
...
Thanks, Simon. I'm going to tackle your instructions in the AM and

report
back after. (Your method sounds especially good as you say it kills

the
ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will open,

on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the

Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use Alt+F11 as
before and instead of double clicking Thisworkbook, right click in

that
area, choose Insert and then choose Module, then you can paste your

code
in there. The best way to learn is to record a macro while you are

doing
a task and then go back and take a look at the generated code, it's

true
to say that you will see a lot of code that is excess to

requirements
but it will give you a basic idea on how things are structured.



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=50724

  #16  
Old January 17th, 2009, 06:18 AM posted to microsoft.public.excel.newusers
T. Valko
external usenet poster
 
Posts: 15,759
Default "Marching ants" around copied cell

Would that be the same if the code was saved in PERSONAL.xls?

???

I'm not following you.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Would that be the same if the code was saved in PERSONAL.xls?T.
Valko;186308 Wrote:
The method that Simon is describing can only be used in the workbook in
which you place the code.

The method I use (which takes more work to setup) can be used in any
workbook.

--
Biff
Microsoft Excel MVP


"Riccol" wrote in message
...
Thanks, Simon. I'm going to tackle your instructions in the AM and

report
back after. (Your method sounds especially good as you say it kills

the
ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will open,

on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the

Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use Alt+F11 as
before and instead of double clicking Thisworkbook, right click in

that
area, choose Insert and then choose Module, then you can paste your

code
in there. The best way to learn is to record a macro while you are

doing
a task and then go back and take a look at the generated code, it's

true
to say that you will see a lot of code that is excess to

requirements
but it will give you a basic idea on how things are structured.



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:
http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=50724



  #17  
Old January 17th, 2009, 06:31 AM posted to microsoft.public.excel.newusers
Simon Lloyd[_81_]
external usenet poster
 
Posts: 1
Default "Marching ants" around copied cell


Sorry!, i meant if the code was stored in the ThisWorkbook module of
PERSONAL.xls would it not then affect every workbook opened?T. Valko;186343 Wrote:
Would that be the same if the code was saved in PERSONAL.xls?


???

I'm not following you.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Would that be the same if the code was saved in PERSONAL.xls?T.
Valko;186308 Wrote:
The method that Simon is describing can only be used in the workbook

in
which you place the code.

The method I use (which takes more work to setup) can be used in any
workbook.

--
Biff
Microsoft Excel MVP


"Riccol" wrote in message
...
Thanks, Simon. I'm going to tackle your instructions in the AM and
report
back after. (Your method sounds especially good as you say it

kills
the
ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will

open,
on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the
Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use Alt+F11

as
before and instead of double clicking Thisworkbook, right click

in
that
area, choose Insert and then choose Module, then you can paste

your
code
in there. The best way to learn is to record a macro while you

are
doing
a task and then go back and take a look at the generated code,

it's
true
to say that you will see a lot of code that is excess to
requirements
but it will give you a basic idea on how things are structured.



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage' (http://www.thecodecage.com))

------------------------------------------------------------------------
Simon Lloyd's Profile:
'The Code Cage Forums - View Profile: Simon Lloyd'

(http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread: '\"Marching ants\" around copied cell - The Code

Cage Forums' (http://www.thecodecage.com/forumz/sh...ad.php?t=50724)



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=50724

  #18  
Old January 17th, 2009, 11:04 PM posted to microsoft.public.excel.newusers
T. Valko
external usenet poster
 
Posts: 15,759
Default "Marching ants" around copied cell

Doesn't work that way for me. It only works in the Personal.xls file.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Sorry!, i meant if the code was stored in the ThisWorkbook module of
PERSONAL.xls would it not then affect every workbook opened?T.
Valko;186343 Wrote:
Would that be the same if the code was saved in PERSONAL.xls?


???

I'm not following you.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Would that be the same if the code was saved in PERSONAL.xls?T.
Valko;186308 Wrote:
The method that Simon is describing can only be used in the workbook

in
which you place the code.

The method I use (which takes more work to setup) can be used in any
workbook.

--
Biff
Microsoft Excel MVP


"Riccol" wrote in message
...
Thanks, Simon. I'm going to tackle your instructions in the AM and
report
back after. (Your method sounds especially good as you say it

kills
the
ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will

open,
on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the
Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use Alt+F11

as
before and instead of double clicking Thisworkbook, right click

in
that
area, choose Insert and then choose Module, then you can paste

your
code
in there. The best way to learn is to record a macro while you

are
doing
a task and then go back and take a look at the generated code,

it's
true
to say that you will see a lot of code that is excess to
requirements
but it will give you a basic idea on how things are structured.


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage' (http://www.thecodecage.com))

------------------------------------------------------------------------
Simon Lloyd's Profile:
'The Code Cage Forums - View Profile: Simon Lloyd'

(http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread: '\"Marching ants\" around copied cell - The Code

Cage Forums' (http://www.thecodecage.com/forumz/sh...ad.php?t=50724)



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:
http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=50724



  #19  
Old January 17th, 2009, 11:17 PM posted to microsoft.public.excel.newusers
Simon Lloyd[_85_]
external usenet poster
 
Posts: 1
Default "Marching ants" around copied cell


I hadn't tried it, i thought that all code stored in the PERSONAL.xls
was available in each workbook you open. This may be crude but how about
putting that Thisworkbook code in the .xlb file? as this is the base
file that excel references when starting (or at least thats what i
presume) wouldn't every workbook you open already be populated with that
code?

T. Valko;186952 Wrote:
Doesn't work that way for me. It only works in the Personal.xls file.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Sorry!, i meant if the code was stored in the ThisWorkbook module of
PERSONAL.xls would it not then affect every workbook opened?T.
Valko;186343 Wrote:
Would that be the same if the code was saved in PERSONAL.xls?

???

I'm not following you.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Would that be the same if the code was saved in PERSONAL.xls?T.
Valko;186308 Wrote:
The method that Simon is describing can only be used in the

workbook
in
which you place the code.

The method I use (which takes more work to setup) can be used in

any
workbook.

--
Biff
Microsoft Excel MVP


"Riccol" wrote in message
...
Thanks, Simon. I'm going to tackle your instructions in the AM

and
report
back after. (Your method sounds especially good as you say it
kills
the
ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will
open,
on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the
Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use

Alt+F11
as
before and instead of double clicking Thisworkbook, right

click
in
that
area, choose Insert and then choose Module, then you can paste
your
code
in there. The best way to learn is to record a macro while you
are
doing
a task and then go back and take a look at the generated code,
it's
true
to say that you will see a lot of code that is excess to
requirements
but it will give you a basic idea on how things are

structured.


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage' ('The Code Cage'

(http://www.thecodecage.com)))


------------------------------------------------------------------------
Simon Lloyd's Profile:
'The Code Cage Forums - View Profile: Simon Lloyd'
('The Code Cage Forums - View Profile: Simon Lloyd'

(http://www.thecodecage.com/forumz/member.php?userid=1))
View this thread: '\"Marching ants\" around copied cell - The Code
Cage Forums' ('\"Marching ants\" around copied cell - The Code Cage

Forums' (http://www.thecodecage.com/forumz/sh...d.php?t=50724))



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage' (http://www.thecodecage.com))

------------------------------------------------------------------------
Simon Lloyd's Profile:
'The Code Cage Forums - View Profile: Simon Lloyd'

(http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread: '\"Marching ants\" around copied cell - The Code

Cage Forums' (http://www.thecodecage.com/forumz/sh...ad.php?t=50724)



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=50724

  #20  
Old January 17th, 2009, 11:49 PM posted to microsoft.public.excel.newusers
T. Valko
external usenet poster
 
Posts: 15,759
Default "Marching ants" around copied cell

The *.xlb file is a file that stores information about toolbars and menus.

What you could do is create a new default book.xlt template and put the code
in there. Save the book.xlt file in the Excel startup directory. Then every
*new file* will have the code available but already existing files won't
have it.

Eh, that doesn't sound too "cool"! I'm sure you'd want to have this
available to *every* file. The only way I know how to do that is what I've
done and create a toolbar button and attach the macro.

It's more of an "ergonomics" issue with me. It's easier to use the mouse to
click the button then to have to look away to the keyboard and "find" the
ESC key!

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

I hadn't tried it, i thought that all code stored in the PERSONAL.xls
was available in each workbook you open. This may be crude but how about
putting that Thisworkbook code in the .xlb file? as this is the base
file that excel references when starting (or at least thats what i
presume) wouldn't every workbook you open already be populated with that
code?

T. Valko;186952 Wrote:
Doesn't work that way for me. It only works in the Personal.xls file.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Sorry!, i meant if the code was stored in the ThisWorkbook module of
PERSONAL.xls would it not then affect every workbook opened?T.
Valko;186343 Wrote:
Would that be the same if the code was saved in PERSONAL.xls?

???

I'm not following you.

--
Biff
Microsoft Excel MVP


"Simon Lloyd" wrote in message
...

Would that be the same if the code was saved in PERSONAL.xls?T.
Valko;186308 Wrote:
The method that Simon is describing can only be used in the

workbook
in
which you place the code.

The method I use (which takes more work to setup) can be used in

any
workbook.

--
Biff
Microsoft Excel MVP


"Riccol" wrote in message
...
Thanks, Simon. I'm going to tackle your instructions in the AM

and
report
back after. (Your method sounds especially good as you say it
kills
the
ants immediately after pasting.)

RC

Simon Lloyd wrote:
Press and hold Alt & F11, the VBE (visual basic editor) will
open,
on
the left you will see a list of your worksheets and on called
ThisWorkbook, they are all code modules, double click the
Thisworkbook
and paste the code i gave.

If you are ever given code for a standard module then use

Alt+F11
as
before and instead of double clicking Thisworkbook, right

click
in
that
area, choose Insert and then choose Module, then you can paste
your
code
in there. The best way to learn is to record a macro while you
are
doing
a task and then go back and take a look at the generated code,
it's
true
to say that you will see a lot of code that is excess to
requirements
but it will give you a basic idea on how things are

structured.


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage' ('The Code Cage'

(http://www.thecodecage.com)))


------------------------------------------------------------------------
Simon Lloyd's Profile:
'The Code Cage Forums - View Profile: Simon Lloyd'
('The Code Cage Forums - View Profile: Simon Lloyd'

(http://www.thecodecage.com/forumz/member.php?userid=1))
View this thread: '\"Marching ants\" around copied cell - The Code
Cage Forums' ('\"Marching ants\" around copied cell - The Code Cage

Forums' (http://www.thecodecage.com/forumz/sh...d.php?t=50724))



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' ('The Code Cage' (http://www.thecodecage.com))

------------------------------------------------------------------------
Simon Lloyd's Profile:
'The Code Cage Forums - View Profile: Simon Lloyd'

(http://www.thecodecage.com/forumz/member.php?userid=1)
View this thread: '\"Marching ants\" around copied cell - The Code

Cage Forums' (http://www.thecodecage.com/forumz/sh...ad.php?t=50724)



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile:
http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=50724



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.