By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

Line intercept - mschart

P: n/a
Hi.
i have i problem such as getting the intercept point for my graph which
is made in MSgraph Access 2003. the lines in the graph is from tabel
and , i need some idea for some vba code to get the intercept point for
the lines.

Jan 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Geagleeye wrote:
i have i problem such as getting the intercept point for my graph which
is made in MSgraph Access 2003. the lines in the graph is from tabel
and , i need some idea for some vba code to get the intercept point for
the lines.


I have no idea what the answer to your question is, but a possibility,
pointed out to me by Steve Santos a little while ago, is to download the
following app from the MS site. It shows, I believe, sample chart
manipulation in Access and may have the answer to your question (watch
for wrap):

http://download.microsoft.com/downlo...-us/vbagrp.exe

Alternatively, if the above link is broken in your news reader, try
http://tinyurl.com/cmbj3

If this does not help you, what I've found very useful in the past when
trying to manipulate various properties of the graph has been to open
EXcel. Start recording an Excel macro and go through the setting up of
your graph, including where the intecept point is.

Save the macro and then look at the VBA editor for the macro. There are
sometimes still some soggy ground that has to be traversed - the object
browser can be an enormous help here - but it at least gives you a
starting point.

Sorry I don't have a direct answer to your question, but if you don't
get a response, try the above two ideas.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Jan 4 '06 #2

P: n/a
Red
Ahh... another question that I can't really answer, but can possibly
help.... and obviously blow off a little more work... woo hooo....

Here's a GREAT link for you to help you in your search for MS Graph
help...
(this is actually for 97, but, you can find later versions from there)
http://msdn.microsoft.com/archive/de.../D6/S5B5EF.asp

BUT....

If you know what you want to do, and you can do it in Excel, do like
Tim Marshall said...
1) Export data to excel
2) Record a macro to do what you want
3) convert macro into a string (really, it's not that hard)
4) Run macro after exporting information from Access!

i.e... here's a quickie for you, to learn how to do what I just said...
(copy and paste into a module and watch it do it's THING! :D )

Private Sub ExcelTest()
Dim XLS As Object, Wkb As Object, strCode As String
Dim X As Integer, Y As Integer, Z As Integer
'XLS is our application object
Set XLS = CreateObject("Excel.Application")
XLS.Application.Visible = True
XLS.Application.workbooks.Add
'Wkb is our worksheet object
Set Wkb = XLS.Application.activeworkbook.worksheets(1)

'Fill our worksheet with some information
X = 0
For X = 1 To 10
For Y = 1 To 10
Z = Y * X
Wkb.cells(X, Y) = Z
Next Y
Next X

'Now make the macro
strCode = "Sub MakeChart()" & vbcrlf & _
" Charts.Add" & vbcrlf & _
" ActiveChart.ChartType = xlColumnClustered" & vbcrlf & _
" ActiveChart.SetSourceData Source:=Sheets(" & Chr(34) & "Sheet1" &
Chr(34) & ").Range(" & Chr(34) & "A1:J10" & Chr(34) & "),
PlotBy:=xlRows" & vbcrlf & _
" ActiveChart.Location Where:=xlLocationAsNewSheet, Name:=" &
Chr(34) & "Tada!" & Chr(34) & vbcrlf & _
" With ActiveChart" & vbcrlf & _
" .HasTitle = True" & vbcrlf & _
" .ChartTitle.Characters.Text = " & Chr(34) & "Tada!" & Chr(34)
& vbcrlf & _
" .Axes(xlCategory, xlPrimary).HasTitle = False" & vbcrlf & _
" .Axes(xlValue, xlPrimary).HasTitle = False" & vbcrlf & _
" End With" & vbcrlf & _
"End Sub"
'Add the macro to the workbook
XLS.activeworkbook.VBProject.VBComponents.Item(1). CodeModule.AddFromString
strCode
'Run the macro! :D
XLS.Application.Run "Thisworkbook.MakeChart"

End Sub
(I've been dieing to show taht to someone :D )

Jan 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.