View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Santa-D Santa-D is offline
external usenet poster
 
Posts: 34
Default Copy and paste formatting and values only

I have created a template - "budget worksheet template.xla" to have
the values pasted into it.

The area that I am struggling with is trying to convert the logic into
VBA as I have little knowledge on VBA programming.... I definitley
need to do a course!


Obviously there needs to be a loop based on the array named
"loop.range", each value in the range (97 of them) will need to be
passed to the master summary sheet to update the values so that it can
be copied into the workbook.

I also want the worksheet to be named after the costcentre..... (the
Costcentre is the primary key for the loop.range and to generate the
summary report) ..... EG: - "2340105 - 08.09 Budget template.xls"

From other posts I have managed to determine that this portion of the
code will be something like....

<CODE
....

Dim strSheetName as string

strSheetName = ActiveSheet.Range("BCostCentre") & " - 08.09 Budget
template.xls"

....
</CODE


The new worksheet that has been opened will have the data from the
following copied and pasted from the master report.... (M. means
Master, N. means New Workbook)

From-To
M.E10:E11-N.E10:E11
M.D11-N.D11
M.G19:H788-N.G19:H788


So that I can be of further assistance the process would be:

1. Insert 1 x CostCentre code from the range into the field
BCostCentre on the Master worksheet
2. Recalculate values
3. Create new worksheet from template file "budget worksheet
template.xla"
4. Copy data ranges from master worksheet into new worksheet as values
5. Save new worksheet As "<BCostCentre - 08.09 budget templates.xls"
into folder C:\Temptrial and close
6. Repeat steps 1-5 for Next CostCentre

Any assistance would be fantastic.....