ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel macro -example (https://www.excelbanter.com/excel-programming/315382-excel-macro-example.html)

Yanchri Gerber

Excel macro -example
 
Where can i view the code of an example of a macro that rearranges columns
in excel ?

Thanks in advance
Yanchri



JulieD

Excel macro -example
 
Hi

Record one using the macro recorder ... tools / macro / record new macro
to view the code tools / macro / macros, click on the one you created and
choose edit

Regards
julieD

"Yanchri Gerber" wrote in message
...
Where can i view the code of an example of a macro that rearranges
columns in excel ?

Thanks in advance
Yanchri




Yanchri Gerber

Excel macro -example
 
Maybe i'm misreading something.
But what i actually want is an example of a macro, already created.
Then i want to view the code.

Thanks
Yanchri

"JulieD" wrote in message
...
Hi

Record one using the macro recorder ... tools / macro / record new macro
to view the code tools / macro / macros, click on the one you created and
choose edit

Regards
julieD




JulieD

Excel macro -example
 
Hi

if you record one then you will be able see the code (and make some sense of
it as you'll know what you did to cause the code to be written the way it
is) .. other than that maybe someone else will be able to provide this for
you.

Regards
JulieD

"Yanchri Gerber" wrote in message
...
Maybe i'm misreading something.
But what i actually want is an example of a macro, already created.
Then i want to view the code.

Thanks
Yanchri

"JulieD" wrote in message
...
Hi

Record one using the macro recorder ... tools / macro / record new macro
to view the code tools / macro / macros, click on the one you created and
choose edit

Regards
julieD






Tom Ogilvy

Excel macro -example
 
Sub MoveColumn()
' moved column E before Column B
Dim rng As Range
Set rng = Columns(5)
rng.Cut
Columns(2).Insert
End Sub

--
Regards,
Tom Ogilvy


"Yanchri Gerber" wrote in message
...
Maybe i'm misreading something.
But what i actually want is an example of a macro, already created.
Then i want to view the code.

Thanks
Yanchri

"JulieD" wrote in message
...
Hi

Record one using the macro recorder ... tools / macro / record new

macro
to view the code tools / macro / macros, click on the one you created

and
choose edit

Regards
julieD







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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com