Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Make code more economical

Hi Frank,

Thanks for the quick response. The program does not error in any
particular place. The code runs through OK for about 8 to12 loops then I get
an error in Excel saying - " General Protection Fault in Module KRNL386". I
presumed it to be poor programming and was looking for some suggestions. I
think you may have answered my question with that. I will review the code
and see.

Many Thanks for you help Mark



"Frank Kabel" wrote in message
...
Hi Mark
first I asked for the relevant part :-) So you may indicate where your
code does not work.
Some general points: You use Select + Activate + Activecell. You should
get rid of this (will slow down your code, etc.). e.g. the first
sttements could be written as follows:

Public Sub Format_Sheet()
'################################################# ##############
'Program to transfer and format plannings
'10 Sept 04
'#######################################

Dim strDetailL(16) As String
Dim strDetailR() As String
Dim strDetailBR() As String
Dim strToolDetail() As String
Dim strStartPoint As String
Dim strStartPointDetail As String
Dim counter As Integer


With ActiveSheet
'Collect Left Detail data
strDetailL = .Range("C2:C17").Value

'Collect Right Detail Data
ReDim strDetailR(0)
strDetailR(0) = .Range("F2").Value
counter = 3
Do While .Cells(counter, 1).Value < "5"
ReDim Preserve strDetailR(UBound(strDetailR) + 1)
strDetailR(UBound(strDetailR)) = .Cells(counter, 1).Value
counter = counter + 1
Loop

strStartPoint = .Cells(counter, 5).Address
End With
....




--
Regards
Frank Kabel
Frankfurt, Germany

"Mark C" schrieb im Newsbeitrag
...



Reply
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
Make code apply to more than 1 column Cheryl Excel Discussion (Misc queries) 6 April 16th 10 10:02 PM
How do I make a Bar code ??? Wadewild Excel Discussion (Misc queries) 2 June 9th 08 09:08 PM
Economical grouping of lengths out of much longer lengths Richard (a Builder not a Mathematician) Excel Worksheet Functions 1 January 19th 08 10:28 PM
If I have the zip code can I make it put the city in another cell Carrie Excel Worksheet Functions 5 May 18th 05 08:26 PM
Make a Change to Code Steved[_3_] Excel Programming 2 September 29th 04 11:31 PM


All times are GMT +1. The time now is 11:45 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"