ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Two doubts for Macros (https://www.excelbanter.com/excel-discussion-misc-queries/156874-two-doubts-macros.html)

xavi garriga

Two doubts for Macros
 
Hi to all;

I've created a Macro and this must do some actions, I've done the most of
them, but there are two that I don't know what code:

1)I need to hide columns with the Macro

2)I need to insert rows with the Macro

If anyone knows any of these codes it would be very great.

Thanks to all;
--
atrep

Mike H

Two doubts for Macros
 
Thypical code for those actions could be:-

Columns("A").EntireColumn.Hidden = True
Rows("13:13").Insert Shift:=xlDown

Mike

"xavi garriga" wrote:

Hi to all;

I've created a Macro and this must do some actions, I've done the most of
them, but there are two that I don't know what code:

1)I need to hide columns with the Macro

2)I need to insert rows with the Macro

If anyone knows any of these codes it would be very great.

Thanks to all;
--
atrep


Don Guillett

Two doubts for Macros
 
You could have looked in the vba help
rows("1:4").hidden=true
columns("a:d").hidden=true
etc
OR, record a macro while doing to see what happens. Then clean up

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"xavi garriga" wrote in message
...
Hi to all;

I've created a Macro and this must do some actions, I've done the most of
them, but there are two that I don't know what code:

1)I need to hide columns with the Macro

2)I need to insert rows with the Macro

If anyone knows any of these codes it would be very great.

Thanks to all;
--
atrep




All times are GMT +1. The time now is 12:19 AM.

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