LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Nestling of functions

I want to insert a certain number of row texts into 20 identical spreadsheets.
When I copy the area I want to insert then my macro stops after the first of
the 20 sheets.
I use "for x=1 to 20" "Next x" to acheive the repeated copy.

Is there a simple way to get the result i want?

20 sheets in one Workbook

The code I have is the following. It solves the problem but on slow machines
in the organisation it takes time as I make three loops

-----------------------------------------------------------
ActiveSheet.Unprotect Password:="tomstr"

Sheets("Pos A").Select
For x = 1 To 20
ActiveSheet.Unprotect Password:="tomstr"
Range("a31").Select
ActiveSheet.Next.Select
Next x


Sheets("Parametrar").Select
Range("b40:e77").Select
Application.CutCopyMode = False
Selection.Copy

Sheets("Pos A").Select
For x = 1 To 20
ActiveSheet.Paste
ActiveSheet.Next.Select
Next x

Sheets("Pos A").Select
For x = 1 To 20
Range("a12").Select
Range("a2").Select
Range("a1").Select
ActiveSheet.Protect Password:="tomstr"
ActiveSheet.Next.Select
Next x

Sheets("Projektbeskrivning").Select
ActiveSheet.Protect Password:="tomstr"
Range("a12").Select
Range("a2").Select
Range("a1").Select
End Sub
--
Tomas S




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert cell formula functions to code functions Adnan Excel Discussion (Misc queries) 1 October 1st 08 08:30 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Looking for a site with functions that substitute the ATP functions Franz Verga Excel Worksheet Functions 3 June 24th 06 04:30 AM
Nestling functions Tomas Stroem Excel Programming 3 January 18th 06 10:00 AM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"