How To Make Usercontrol With Excel Chart?
hi If someone knows how to make a usercontrol (or an active X) with OLE excel chart? I know it's difficult, but if there any ways to make this... tell me.
Thanks a lot
David
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Can I Make A Chart (jpg) In Batch Without Excel
hi,
i'm having the following problem:
i have a VB6 program that makes an HTML document which contains a chart. The chart is made by making an excel document and chart. This excel document is then exported to a html document. This works fine but the program has to function on a server which doesn't have excel. Also this program is supposed to run in batch (no visualisation in VB6, no forms).
Does anyone has any idea how to solve this problem?
If i can make a chart in jpg format based on data that is stored in a db, i can put that in a html template.
tnx
Dificult One (try To Make Gantt Chart In EXCEL)
Hi to all,
In first place congratulations for the excellent forum that you have.
I have a doubt that I don’t now if it’s possible to solve with EXCEL, but I would like to try. So what I want is similar to a Gantt chart, in sheet one I have a group of values that have a beginning time and a end time.
In column B and C I have the name of several flights (column B name of company, column C number of the flight), in column D I have the beginning time, in column E the end time, in column F I have numbers that indicates how many check-in I need for each flight.
In sheet 2 I have 6 groups (A, B, C, D, E and F) that represent the total of check-in desk. I have made a little example in this sheet, in a way that you guys can understand what I want and try to help me if possible.
You guys can see that for the last flight that I represent I have 2 empty check-in (23 and 24) in group A, that happens because the flight LK 300 need 3 check-in desk and they have to be contiguous, in other words they have to stay all in the same group, they can’t stay 2 in one group and 1 in other group.
I don’t now if this is possible to do automatically in EXCEL, so if you guys can give a help I really appreciate.
Best regards,
Ismael
How To Copy A Chart From One OLE Excel Sheet To An OLE Excel Chart Object
Hi all,
Kinda stuck here and I have been searching for the way to do this all day. I have a spreadsheet with Charts in one VB OLE container (Excel.Sheet.8)and I want to copy one of the charts to another VB OLE container (Excel.Chart.8) and have it sized to fit in my OLE container. I cant seem to get it to work. Any help?
Where OLE1 = spreadsheets with charts
and OLE2 is a chart
Code:
OLE1.Class = "Excel.Sheet.8"
OLE1.SourceDoc = App.Path & "Data5.xlt"
OLE1.Action = 0
'... Work with the spreadsheet...
OLE2.Class = "Excel.Chart.8"
OLE2.Action = 0
Set OLE2.object = OLE1.object.Charts(1) 'Doesnt Work
OLE2.object.Height = 5000 'Doesnt Work
OLE2.object.Width = 10000
How Make Propertis For Usercontrol
I make a simple usercontrol(like command button)
and use this code :
Code:
Public Event CLICK()
Private Sub UserControl_Click()
RaiseEvent CLICK
End Sub
and now I want to give theusercontrol a prpertis (caption,enabled)
when I write a usercontrol . after the point I want to see it in the list
of propertis after put a point beside the UserControl1
it's mean when I write this code :
command . caption= "hello"
how can I do that by simple code pleas because I'm a new
and thankyou for help
How To Make A Usercontrol Run Only In Run Time???
Hello fellow programmers,
I have a usercontrol, it has got a picBox, i'm BitBlting some image to the picBox, now I want this bitblting process to occur only when the program is running (Pressing f5), i think u guys got my problem, plz help.
How To Make VB Usercontrol Be Able To Update Data?
How to make VB usercontrol be able to update data? MSDN library tells clear how to bind properties of the usercontrol in VB to data, but I've found no clear description of how to update data with new properties' values. Can anybody help me (links, samples)?
How To Make Usercontrol Like Date/time Picker
Guys,
How do I create a 'popup' like a combobox or date/time picker? When you press a button a small 'window' (or popup, whatever you like to call it) appears with controls on it. Can someobody point me in the right direction?
Thanx in advance
How To Make A Toolbar Representation Bitmap For A UserControl??
Hello Every1,
I wanna make a Bitmap for my usercontrol so that I can change its representation in the toolbox. But the problem, is no matter how big the bitmap i make, it cant be displayed properly in the VB Toolbox. Its displayed but nothing can be made out of it. I want to make one just like the Label control, what dimensions should i take for the bitmap and what format should i save it in.Thanx in advance.
Make Chart
how do you make a bar chart in VB6 using MS Chart control?
(using data from a databbase)
can some1 write some example code?
thanks
Make A Simple Chart In VB
I'm trying to make a simple bar chart or graph in VB. What is the easiest way to do this? Where could I find a tutorial or something on this?
~nlween
Need To Make A Speedometer Chart
Hi all, I am a newcomer to VB and don't really know what I am doing. I am trying to make a speedometer to visualise data from an excel spreadsheet. For example, if cell in excel reads 86% then the needle points to 86 on the dial.
I have made one using doughnut graphs and found one made with scatter graphs but my boss wants it to look fancier and the needle to be smooth running rather than jump to numbers.
I can create the dial and the needle no problem, but cannot get the needle to move. Is it possible, if so can some one please help me!
Thank you.
How To Make A Chart Report
hello!
i am newbie here...
i'm making a project in vb6 and i want to create a chart report displaying the months...i want to display the whole year even if i have only 2 months...btw i'm using mysql as my database...
hope u could help me with my problem...
tnx!!!
If You Are Planing To Make Chart
I realy need to share this
If you are gona make chart in VB this is maby this is som for you
I find this in www.planet-source-code.com
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=32583&lngWId=1
Make Usercontrol Invisible Code In The Control Itself Or Other Ideas!! (Regions)
hi there,
My usercontrol has been regioned.
but the region is activated in the paint event, which it must be as i'm doing several things to it:
(A) loading a bitmap.
(B) making a buffer of that bitmap(Gets a portion of the bitmap).
(C) rotates that bitmap(Any angle).
(D) Anti aliasing it
(E) makes a region of it.
but i want it to be invisible so you don't see the region been built etc. the "Usercontrol.visible" is not avaible in the control itself.
There must be a way to make it invisible by sending a message to it, but the obvious fault in this is the control will want to repaint itself.
is there a way around this??
i could post the control and a test program if you want..
The pig..
Make A Chart Name Refer To A Cell.
Okay,
What I'm trying to do is create a new chart with the title being collected from a certain cell; A1
I'm using the line
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:= <Cell A1>
but I'm really not sure what to put after the name in order to refer to a cell.
Any ideas?
Most Appreciated
How To Make Line Chart That Always Updated
Anyone know how to make a line chart that updates the data every 10 ms and the chart just show latest 10 sec datas.
so it's like Stock chart with ticks time scale
like this ---> http://www.dailyfx.com/fxpowerchart/ChartStation.html
chart type = Line chart
Time scale = Ticks
but in VB.
If anyone have the sample program... please attach.
Thanks
Make Treevew Act Like Pedigree Chart
Good day
I've been trying to make the Treeview control work more like a pedigree chart. Currently, every child node of the treeview goes UNDER the parent node. For a Pedigree chart, some child nodes go above and some go below.
The best example of this type of chart is a family tree only rather tha going from the top down, one would go from left to right. The parent node would be centered vertically and then one child node (the father) would go above this node and to the right, and the other child node (the mother) would go below this node and also to the right. Each child (well, actually parent ) node would have similar mother and father nodes going above and below.
Is this possible with the treeview or does anyone know of any other way to accomplish this?
Many Thanks
- Shaun
How To Make Gantt Chart From Scratch
Hello Eeveryone
Thanks all for nice codes.
Can any body help me in making gantt chart from scratch or can i find free gant chart code or activex free
on the internet.
or can anybody help in , if he has already designed that code.
i really need it for my university project.
thanks in advance for all kind people out there
Column Chart, Make Columns Touch?
Any ideas on how to make the columns in a column chart touch?
Please take a look at the bmp to see what I mean by column chart. Thanks!!!
Make Chart At Form Based On Yes/No Check Box
any1 know how?
can i make calculation for check box? coz i make another Survey system than use Comply and Don't Comply only.. in the end of month, it will show graph for performance for each my crew..
any have an idea? i've tried it but still blur
any example?
Excel Chart - Paste Special As Picture In Excel Itself
Hi All,
I am working on a report and it needs to be generated daily. After generating and creating charts, I need to paste special those charts as "Pictures". Is there any way to do this? And also i need to paste special every single chart in the work book. I already done a code but it not working properly.. and the important point is i need to paste special the chart at the exact position where i intended to cut. Is this possible???
Pls treat this as emergency and advice me on this.
Thanks in advance..
Regards
Mohan
Excel 2000, Create Powerpoint Org Chart From Excel.
I want to create a powerpoint org chart from Excel using information held in Excel. I have found how to add an Org chart into Powerpoint but can't find anywhere that tells you how to change the details/options or add Subordinates Managers etc and alter those details.
Anyone have any ideas (I don't want to create seperate text boxes if possible.)
Ps if you can create a good powerpoint org chart from excel, any ideas on the best layout of information in the spreadsheet to work through and create it.
This is one of those, that would be good if you can do it (created them in the past and are time consuming pains), rather than has to be done last week ideas.
Regards.
rob.
Excel Chart In VB
i want to make a form and an exe file after that
where there are 6 text boxes where i key in value and submit
when i submit the chart also in the same form takes the value and draws the graph.
the chart is an excel chart
embedded in the form,
i am able to do this using the VB editor in excel
like
Sheets("Sheet1").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox1.Value
Chart1. is the object in my form
how do i call it and select the sheet1 and do the same like i did in excel
please help,
i also tried the OLE way, but also not sure how to do
thanks,
darcher
Excel Chart
I've been working on an excel file for a while and have been getting quite a bit of help from everyone here. I added a chart to my file and I wanted to tweak it a little. The Y axis is in seconds and I would like to have a red line drawn all the way across the chart at the 60 seconds mark. As I said before the y axis is seconds and it changes if I have large or small amounts for in my series. Sometimes it goes from 0 to 100 or sometimes its from 0 to 2000. So as you can see the red line will need to move up and down as the chart changes.
Is this even posible?
If not, Thanks anyway.
Excel Chart
Ok ... i currently have my code drawing from an array with 2 cols .. this produces a chart with the two sets of variables plotted on the y axis against incremental x values that excel has set up (ie 1 2 3 4 ....)
Now .. what i want to do is keep the 2 y series ... but make the x axis my own values.....
here is my code
Dim Counter As Integer
Counter = 1
Do While Counter <= N
grdAnalytical.Row = Counter
grdAnalytical.Col = 2
grdAnalytical.Text = MatrixOutput(Counter)
arrOut(2, Counter) = MatrixOutput(Counter)
Counter = Counter + 1
Loop
'------------Excel Chart---------------------------------------'
Dim oXL As Object ' Excel application
Dim oBook As Object ' Excel workbook
Dim oSheet As Object ' Excel Worksheet
Dim oChart As Chart ' Excel Chart
Dim iRow As Integer ' Index variable for the current Row
Dim iCol As Integer ' Index variable for the current Row
Dim cNumCols As Integer ' Number of points in each Series
Dim cNumRows As Integer ' Number of Series
cNumRows = 2
cNumCols = N
ReDim aTemp(1 To cNumRows, 1 To cNumCols)
'Start Excel and create a new workbook
Set oXL = CreateObject("Excel.application")
Set oBook = oXL.Workbooks.Add
Set oSheet = oBook.Worksheets.Item(1)
oSheet.Range("A1").Resize(cNumRows, cNumCols).Value = arrOut
'Add a chart object to the first worksheet
Set oChart = oSheet.ChartObjects.Add(50, 40, 400, 300).Chart
With oChart 'or you could use ActiveChart
.ChartType = xlLine
.SetSourceData Source:=oSheet.Range("A1").Resize(cNumRows, cNumCols)
.HasTitle = True
.ChartTitle.Characters.Text = "Method Comparison"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Node"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Temperature"
.SeriesCollection(1).Name = "=""Analytical"""
.SeriesCollection(2).Name = "=""Finite Differences"""
With oChart.Axes(xlCategory)
.HasMajorGridlines = True
.HasMinorGridlines = True
End With
End With
'Make Excel Visible:
oXL.Visible = True
Excel Chart PLEASE PLEASE HELP !
ok ... below is my code ... which does produce a graph just fine ... the problem is trying to add a title or change the graph type ...
i have tried adding
oChart.hasTitle = TRUE
oChart.Title.Caption = "Whatever"
and it always gives me errors .... how can i add a title and change the graph type !! PLEASE
-----------------------------------------------------------------------------------
Dim oXL As Object ' Excel application
Dim oBook As Object ' Excel workbook
Dim oSheet As Object ' Excel Worksheet
Dim oChart As Object ' Excel Chart
Dim iRow As Integer ' Index variable for the current Row
Dim iCol As Integer ' Index variable for the current Row
Dim cNumCols As Integer ' Number of points in each Series
Const cNumRows = 2 ' Number of Series
cNumCols = N
ReDim aTemp(1 To cNumRows, 1 To cNumCols)
'Start Excel and create a new workbook
Set oXL = CreateObject("Excel.application")
Set oBook = oXL.Workbooks.Add
Set oSheet = oBook.Worksheets.Item(1)
oSheet.Range("A1").Resize(cNumRows, cNumCols).Value = arrOut
'Add a chart object to the first worksheet
Set oChart = oSheet.ChartObjects.Add(50, 40, 300, 200).Chart
oChart.SetSourceData Source:=oSheet.Range("A1").Resize(cNumRows, cNumCols)
' Make Excel Visible:
oXL.Visible = True
oXL.UserControl = True
-------------------------------------------------------------------------------
Note: this example is on the microsoft page ... so you can try adding the title code to that if u want to get it working ... the microsoft example generates a random array...
Excel Chart
Hello!
i want to combine Excel Chart in my form!
the Chart data are stored in recordset(query result).
how can i do so?
expample wil be nice to have!
thank you alot in advance
Excel Chart
I have written a VB program which sends a two dimensional array of numbers to an Excel file. This data is then graphed on arrival using VBA code.
How do i make this Excel chart appear on my VB form aswell?
Excel Chart Using ADO?
Hi to all thread viewers,
Is there any possibility of creating an excel-chart using "ADO"........
If yes, please give me some hints...
Thank you in advance..
Using The MS Excel Chart In VB - ?
Could anyone point me to a good resource for using MS Excel chart in vb
or give some sample codes on things like how to change the axis labels /values how to plot points on the graph (multiline) etc
Cheers
Excel Chart In VB
hi.
i'm creating an excel chart in VB. In excel, you can set the
property : "Value(y) crosses between dates" to have excel
plot date values in between the tick marks. Setting this property
to false makes excel plot the date values to correspond to actual
tick marks.
Is this property exposed in the Excel object in VB? I need to set this
to false.
Also, how do i add minor tick marks to an excel chart
from VB?
Thanks, any help would be greatly appreciated.
Excel Chart
hi all,
anyhow, using this forum, i managed to create a chart in excel thru vb code. now i want to change few default settings of the chart.
1) i dont want the vertical lines in the chart.
2) the y scale must be in numeric format and the x scale must be in date format. but in the chart both the scales or shown in date format. how to set the format for both the scales?
3) is it possible to save the excel chart in TIFF or EPS format?
pls guide
regards,
prakash
Excel Chart
Hi, i'm trying to do one excel chart trough VB, but i'm not quite getting it. I did one macro and tried to modified her but with almost no result. Can you help me in this:
My macro:
///
With ObjXLApp
NM = .ActiveSheet.Name
N2 = Format(Date, "MMMM") & " " & Format(Date, "yyyy")
.Charts.Add
.ActiveChart.ChartType = xlLineMarkers
.ActiveChart.PlotBy = xlColumns
.ActiveChart.SeriesCollection.NewSeries
.ActiveChart.SeriesCollection(1).XValues = "={""Recolhas""}"
.ActiveChart.SeriesCollection(1).Values = "=NM" & !R2C4: RintNumerOfRows2C4 ""
.ActiveChart.SeriesCollection(1).Name = "=""Último minuto"""
.ActiveChart.SeriesCollection(2).Values = "NM!R2C5:RintNumerOfRows2C5"
.ActiveChart.SeriesCollection(2).Name = "=""Últimos 5 minutos"""
.ActiveChart.SeriesCollection(3).Values = "NM!R2C6:RintNumerOfRows2C6"
.ActiveChart.SeriesCollection(3).Name = "=""Últimos 15 minutos"""
.ActiveChart.Location Where:=xlLocationAsObject, Name:=NM
///
Excel Chart
hi all,
i am using excel object in my project. i managed to write in the data to the excel worksheet and save it. can any one tell me how to draw a chart in excel thru vb program?
pls guide. its urgent
regards,
prakash
Excel Chart
Hello,
1. Who can tell me where i can get the reference to use the vb 6.0 to control EXECL to chart.
2. If i want to show the EXCEL chart(may be very big) , how i can do?
thanks a lot.
Help With Chart In Excel
Hi, I created some code to open up a new Excel workbook that enters information and then creates a pie chart.. I can't quite remember how I put it together, but one part I have is to get letter of the last horizontal cell.. I used this line:
dim LastCell as String
LastCell = Chr(rsStats.RecordCount + Asc("A") - 1)
Then alittle more down, I select the data range:
oChart.SetSourceData Source:=oSheet.Range("A3:" & LastCell & "4"), PlotBy:=xlRows
This is, LastCell seems to work fine with A-Z, but I forgor the possibilty of going beyond Z (AA, AB, etc)..
Does anyone know how to get the name of the horizontal cell from Excel?
Thanks
John
Excel Chart
O has already been set up as a excel.application
I keep getting errors with this...
I created it in the macro of Excel but need it to work in VB
O.Charts.Add
O.ActiveChart.ChartType = xlLine <-ERROR
O.ActiveChart.SetSourceData Source:=O.Sheets("MarketSmart").Range("F1:G" & MScr), PlotBy:=xlColumns
O.ActiveChart.Location here:=xlLocationAsNewSheet, Name:="MS Chart" <-ERROR
With O.ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "MarketSmart"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Date"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Defects"
End With
O.ActiveChart.HasDataTable = False
HELP!!!!!!
API Excel Chart HELP ME PLEASE!!!
I am trying to read data from a .txt file and put certain data into an Excel ole chart in my VB application. Could anyone please point me in the right direction.
Many Thanks
Chart In Excel
Hi guys, I am very new to VB and this forum so be gentle :-)
How do I create a chart in Excel using VB6?
This is how far I have gotten (this is mostly what I have found on the net)
Sub createExcelGraphs()
Dim oXL As Object ' Excel application
Dim oBook As Object ' Excel workbook
Dim oSheet As Object ' Excel Worksheet
Dim oChart As Object ' Excel Chart
Dim iRow As Integer ' Index variable for the number of Rows
Dim iCol As Integer ' Index variable for the number of Cols
Set oXL = CreateObject("Excel.application")
Set oBook = oXL.Workbooks.Add
Set oSheet = oBook.Worksheets.Item(1)
Set oChart = oSheet.chartObjects.Add(50, 40, 300, 200).chart
iRow = 10
iCol = 2
' This line gives the error - "Object required"
oChart.ChartType = Excel.XlChartType.xlLine
oChart.SetSourceData Source:=oSheet.Range("b1").Resize(iRow, iCol)
oXL.UserControl = True
End Sub
I want to create an xlLine graph and be able to chaneg the font on the axis. How do I do this?
Thanks
|