Click here to Skip to main content
15,913,587 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: DLLs and Compiler Directives Pin
Shameel14-Jul-11 3:51
professionalShameel14-Jul-11 3:51 
QuestionDate problem Pin
hang_em13-Jul-11 0:34
hang_em13-Jul-11 0:34 
AnswerRe: Date problem Pin
TheComputerMan13-Jul-11 1:04
TheComputerMan13-Jul-11 1:04 
AnswerRe: Date problem Pin
Dave Kreskowiak13-Jul-11 6:20
mveDave Kreskowiak13-Jul-11 6:20 
AnswerRe: Date problem Pin
sripchowdhury16-Jul-11 0:26
sripchowdhury16-Jul-11 0:26 
AnswerRe: Date problem Pin
Bernhard Hiller19-Jul-11 0:47
Bernhard Hiller19-Jul-11 0:47 
GeneralRe: Date problem Pin
hang_em19-Jul-11 18:09
hang_em19-Jul-11 18:09 
QuestionGraph on Windows Forms (VB) Pin
geekgautam10-Jul-11 23:28
geekgautam10-Jul-11 23:28 
Hi all,

I need to plot a graph on a Windows forms using numeric values stored in an excel sheet

I came accross this code .. it creates an excel sheet and plot graphs in an excel sheet itself

Public Class testchart

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim objXL As Object
        Dim objWbk As Object
        Dim oSheet As Object     ' Excel Worksheet
        Dim oChart As Object     ' Excel Chart

        objXL = CreateObject("Excel.application")
        objWbk = objXL.workbooks.Open("C:\testing\test.xls")

        On Error GoTo ErrHandler

        Dim iRow As Integer      ' Index variable for the current Row
        Dim iCol As Integer      ' Index variable for the current Row

        Const cNumCols = 10      ' Number of points in each Series
        Const cNumRows = 2       ' Number of Series

        oSheet = objWbk.Worksheets.Item(1)

        oChart = oSheet.ChartObjects.Add(50, 40, 300, 200).Chart
        oChart.SetSourceData(Source:=oSheet.Range("A1").Resize(cNumRows, cNumCols))

        ' Make Excel Visible:
        objXL.Visible = True
        objXL.UserControl = True

ExitHandler:
        On Error Resume Next
        objWbk = Nothing
        objXL.Quit()
        objXL = Nothing
        Exit Sub

ErrHandler:
        MsgBox(Err.Description, vbExclamation)
        Resume ExitHandler


    End Sub
End Class



Unable to figure out as to how the same graph can be plotted on a windows form using data from excel

Please guide,
Thanks,
Gauti.
AnswerRe: Graph on Windows Forms (VB) Pin
Dave Kreskowiak11-Jul-11 1:08
mveDave Kreskowiak11-Jul-11 1:08 
SuggestionMessage Removed Pin
12-Jul-11 2:49
Tmoshea12-Jul-11 2:49 
GeneralRe: Graph on Windows Forms (VB) Pin
Dave Kreskowiak12-Jul-11 3:44
mveDave Kreskowiak12-Jul-11 3:44 
AnswerRe: Graph on Windows Forms (VB) [modified] Pin
Tmoshea12-Jul-11 4:43
Tmoshea12-Jul-11 4:43 
GeneralRe: Graph on Windows Forms (VB) Pin
geekgautam28-Jul-11 1:46
geekgautam28-Jul-11 1:46 
QuestionUpgrade My VB Project from VS2008 - VS2010 - Error -Crystal.Decisions.Windows.Forms,Version= 13.0.2000.0 Pin
Paramu19739-Jul-11 5:44
Paramu19739-Jul-11 5:44 
AnswerRe: Upgrade My VB Project from VS2008 - VS2010 - Error -Crystal.Decisions.Windows.Forms,Version= 13.0.2000.0 Pin
Dave Kreskowiak9-Jul-11 7:02
mveDave Kreskowiak9-Jul-11 7:02 
AnswerRe: Upgrade My VB Project from VS2008 - VS2010 - Error -Crystal.Decisions.Windows.Forms,Version= 13.0.2000.0 Pin
thatraja9-Jul-11 7:12
professionalthatraja9-Jul-11 7:12 
QuestionWindows Service Pin
KenBonny7-Jul-11 23:34
KenBonny7-Jul-11 23:34 
AnswerRe: Windows Service Pin
DaveAuld8-Jul-11 1:19
professionalDaveAuld8-Jul-11 1:19 
GeneralRe: Windows Service [modified] Pin
KenBonny8-Jul-11 1:56
KenBonny8-Jul-11 1:56 
JokeRe: Windows Service Pin
Eddy Vluggen8-Jul-11 13:06
professionalEddy Vluggen8-Jul-11 13:06 
GeneralRe: Windows Service Pin
KenBonny10-Jul-11 19:53
KenBonny10-Jul-11 19:53 
Questionmaster page Pin
ghantaanil7-Jul-11 20:27
ghantaanil7-Jul-11 20:27 
AnswerRe: master page Pin
Carmelo La Monica7-Jul-11 20:46
professionalCarmelo La Monica7-Jul-11 20:46 
Questionguardar puntero al ultimo archivo leido por Dir Pin
MasQueUnIntento6-Jul-11 8:07
MasQueUnIntento6-Jul-11 8:07 
AnswerRe: guardar puntero al ultimo archivo leido por Dir Pin
Richard MacCutchan6-Jul-11 9:26
mveRichard MacCutchan6-Jul-11 9:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.