Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default locating charts

When my macro runs it works fine but all the charts end up
on top of each other, I tried recording the macro as I
moved charts with my mouse:

Sub Macro_locate(min_num As String) 'Locate charts within
the Worksheet

Select Case B

Case 1
min_num = "ST01"

Worksheets("query").Activate


ActiveWindow.Visible = False
Sheets("query").Select
ActiveSheet.Shapes("Chart 87").Select
Selection.ShapeRange.IncrementLeft -180#
Selection.ShapeRange.IncrementTop 953.25
ActiveWindow.LargeScroll Down:=-1
ActiveSheet.Shapes("Chart 86").Select
Selection.ShapeRange.IncrementLeft -177#
Selection.ShapeRange.IncrementTop 730.5
ActiveWindow.LargeScroll Down:=-2
ActiveSheet.Shapes("Chart 85").Select
Selection.ShapeRange.IncrementLeft -180.75
Selection.ShapeRange.IncrementTop 301.5
ActiveWindow.LargeScroll Down:=1

End Select
End Sub
The main routine is:
Public Sub Execute()


Dim i As Integer, j As Integer, k As Integer, a As
Integer, min_num As String, _
m As Integer, ST(1 To 17) As Integer, var As Integer




Let j = 0 'j
Let k = 1 'k
Let i = 2 'i
Let a = 0
Let m = 0
Let c = 0
Let num = 0
Let var = 0

For num = 1 To 17

ST(num) = 0

Next


'Sort raw data 9/10/2003 by stuser
Worksheets("raw data").Activate
Worksheets("raw data").Cells.Select
Selection.Sort _
Key1:=Range("B1"), Order1:=xlAscending,
Header:=xlGuess, _
Key2:=Range("E1"), Order1:=xlAscending, Header:=xlGuess


'Chart sorted Data 9/11/2003 by stuser


Do While Worksheets("raw data").Cells(k, 2).Value < ""

min_num = Worksheets("raw data").Cells(k, 2).Value

Select Case min_num

Case "ST01"

ST(1) = ST(1) + 1

Case "ST02"

ST(2) = ST(2) + 1

Case "ST03"

ST(3) = ST(3) + 1

Case "ST04"

ST(4) = ST(4) + 1

Case "ST06"

ST(5) = ST(5) + 1

Case "ST07"

ST(6) = ST(6) + 1

Case "ST08"

ST(7) = ST(7) + 1

Case "ST09"

ST(8) = ST(8) + 1

Case "ST10"

ST(9) = ST(9) + 1

Case "ST11"

ST(10) = ST(10) + 1

Case "ST12"

ST(11) = ST(11) + 1

Case "ST13"

ST(12) = ST(12) + 1

Case "ST14"

ST(13) = ST(13) + 1

Case "ST15"

ST(14) = ST(14) + 1

Case "ST16"

ST(15) = ST(15) + 1

Case "ST17"

ST(16) = ST(16) + 1

Case "ST18"

ST(17) = ST(17) + 1

End Select

k = k + 1

Loop

For m = 1 To 17

Select Case m

Case 1

min_num = "ST01"

Case 2

min_num = "ST02"

Case 3

min_num = "ST03"

Case 4

min_num = "ST04"

Case 5

min_num = "ST06"

Case 6

min_num = "ST07"

Case 7

min_num = "ST08"

Case 8

min_num = "ST09"

Case 9

min_num = "ST10"

Case 10

min_num = "ST11"

Case 11

min_num = "ST12"

Case 12

min_num = "ST13"

Case 13

min_num = "ST14"

Case 14

min_num = "ST15"

Case 15

min_num = "ST16"

Case 16

min_num = "ST17"

Case 17

min_num = "ST18"

End Select

If m = 1 Then

a = 0

Else

For c = 1 To m

var = var + ST(c)

Next c

End If

a = a + 1
j = ST(m)
'Call Macro_chart(a, j, min_num, m)
'Call ManyCharts(min_num)
Next m

End Sub

I've commented out the call to macro calls, I don't have
one that works. Please help in developing a subroutine to
locate the charts I create within a seperate worksheet.
Thanks in advance for any assistance.

Scott Parsons
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
Locating the max value AND performing a fn on it only Pradhan Excel Discussion (Misc queries) 3 July 22nd 09 01:09 AM
locating the cell that contains the MIN or MAX JR Excel Discussion (Misc queries) 2 April 21st 09 05:41 PM
locating duplicates bshorey Excel Discussion (Misc queries) 4 April 24th 08 08:48 PM
Locating Under Payments (HELP!) Raul Aguilar Excel Discussion (Misc queries) 0 March 16th 08 06:30 AM
Locating Karmen New Users to Excel 2 January 30th 06 11:45 PM


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