View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Macro to replace and updating sheets in workbooks

VJ,

Sub DeleteAllShapes()
Dim iCtr As Long
For iCtr = ActiveSheet.Shapes.Count To 1 Step -1
ActiveSheet.Shapes(iCtr).Delete
Next iCtr
End Sub

HTH,
Bernie
MS Excel MVP

"VJ" wrote in message
...
Just a last question?

I have few shapes in the sheet, Do u have any idea How I can delete those

shapes and buttons?

Thanks

"Bernie Deitrick" wrote:

VJ,

Formatting is transfered when you do a copy and paste, if you select all

the
cells (use the button to the upper left of cell A1). The only problem

may be
merged cells, in which case you should un-merge all the cells of V1.0

prior
to pasting V1.1 over it.

HTH,
Bernie
MS Excel MVP

"VJ" wrote in message
...
Bernie, How can I take care of formatting etc?

"Bernie Deitrick" wrote:

VJ,

Don't copy the sheet - copy the cells.....

Copy the cells from sheet1 of V1.1 (DO NOT copy the sheet - select

all
the
cells and use Ctrl-C), then select sheet1 of V1.0, select all the

cells,
and
hit paste.

HTH,
Bernie
MS Excel MVP

"VJ" wrote in message
...
I have a workbook Wb1 with version 1.0 with three sheets. Sheet1,

Sheet2
and Sheet3. Sheets 2 and 3 refers to some cells in sheet1 for

example
sheet1!B3

I have also updated Wb1's sheet1 and named new version 1.1. Now I

need
to
replace sheet1 from version 1.1 into version 1.0. During that

process if
i
delete sheet1 in version 1.0 there is ref# error in sheet 2 and 3.

Is there any way we can achieve this task without getting the

reference
error in sheet 2 and 3 as well as replace sheet 1 from wb 1.1 to wb

1.0?

Thanks in advance.