View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Copy/Paste Template to New Workbook

Nothing in the orignal workbook changes with this code so you images won't
change. the code doesn't even activate any cells in the original workbook.
the code only copies sheet 1 in the original workbook into a new workbook and
saves the new workbook. Since nothing changes none of the formulas will get
updated.

"joel" wrote:

first, this statement is not refereing to a valid sheet

Sheet!$J6

Are you miussing the sheet number before theh exlamation point?


If this is not the problem you need change the following statment for
testing to see what the proble is

from
NewSht.Cells.PasteSpecial _
Paste:=xlPasteValues

to
NewSht.Cells.PasteSpecial _
Paste:=xlPasteAll


Then look at the new workbook and see why the formula isn't working.


"Polo78 Lacoste" wrote:

Joel,
I added the row increment and now works wonders. I also added a
Application.DisplayAlerts = False and Application.DisplayAlerts = True
before and after the While Loop to supress the "Save book2 with
references to unsaved document?" My last problem I have now is
refreshing cell Sheet!$J6 on my report. I have a function on this cell
to insert an image based on my Sheet1$C5 value but the image now does
not change, which should as its now looping from Sheet2 on A column. I
tried adding a "Range("C5:J6").Calculate" before pasting the values,
but that didn't do anything. Maybe I'm not using the calculate properly.
Hope you can help me solve this one.

Thank you in advance.

Newbie to VBA.

*** Sent via Developersdex http://www.developersdex.com ***