Click here to Skip to main content
15,894,343 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: textbox Control problem Pin
Christian Graus5-Feb-09 12:51
protectorChristian Graus5-Feb-09 12:51 
GeneralRe: textbox Control problem Pin
woca4u5-Feb-09 13:14
woca4u5-Feb-09 13:14 
GeneralRe: textbox Control problem Pin
Johan Hakkesteegt5-Feb-09 20:33
Johan Hakkesteegt5-Feb-09 20:33 
GeneralRe: textbox Control problem Pin
woca4u5-Feb-09 20:54
woca4u5-Feb-09 20:54 
GeneralRe: textbox Control problem Pin
Johan Hakkesteegt5-Feb-09 22:10
Johan Hakkesteegt5-Feb-09 22:10 
GeneralRe: textbox Control problem Pin
Christian Graus5-Feb-09 22:15
protectorChristian Graus5-Feb-09 22:15 
AnswerRe: textbox Control problem Pin
Bharat Jain5-Feb-09 23:26
Bharat Jain5-Feb-09 23:26 
QuestionExport problem to Excel Pin
ivo755-Feb-09 10:25
ivo755-Feb-09 10:25 
This is code

Dim xlApp As New Excel.Application()
xlApp.Visible = True
xlApp.UserControl = True
Dim xlWorkBook As Object = xlApp.Workbooks
Dim oldCI As System.Globalization.CultureInfo = _
System.Threading.Thread.CurrentThread.CurrentCulture
System.Threading.Thread.CurrentThread.CurrentCulture = _
New System.Globalization.CultureInfo("en-US")
xlApp.Workbooks.Add()
System.Threading.Thread.CurrentThread.CurrentCulture = oldCI


xlApp.Visible = True
xlApp.UserControl = True

Dim xlWorkSheet As Excel.Worksheet
Dim misValue As Object = System.Reflection.Missing.Value
Dim i As Integer
Dim j As Integer

xlApp = New Excel.ApplicationClass
xlWorkBook = xlApp.Workbooks.Add
xlWorkSheet = xlWorkBook.Sheets("sheet1")

For i = 0 To RabotniciDataGridView.RowCount - 2
For j = 0 To RabotniciDataGridView.ColumnCount - 1
xlWorkSheet.Cells(i + 1, j + 1) = _
RabotniciDataGridView(j, i).Value.ToString()
Next
Next

xlWorkSheet.SaveAs("C:\vbexcel.xls")
xlWorkBook.Close()
xlApp.Quit()

releaseObject(xlApp)
releaseObject(xlWorkBook)
releaseObject(xlWorkSheet)

MsgBox("You can find the file C:\vbexcel.xls")

but when I try export to Excel give me this errror "Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))"

Have some ideas?
AnswerRe: Export problem to Excel Pin
EliottA5-Feb-09 10:40
EliottA5-Feb-09 10:40 
GeneralRe: Export problem to Excel Pin
ivo755-Feb-09 10:59
ivo755-Feb-09 10:59 
GeneralRe: Export problem to Excel Pin
EliottA5-Feb-09 11:02
EliottA5-Feb-09 11:02 
GeneralRe: Export problem to Excel Pin
ivo755-Feb-09 11:10
ivo755-Feb-09 11:10 
GeneralRe: Export problem to Excel Pin
EliottA5-Feb-09 11:20
EliottA5-Feb-09 11:20 
AnswerRe: Export problem to Excel Pin
vaghelabhavesh5-Feb-09 10:44
vaghelabhavesh5-Feb-09 10:44 
GeneralRe: Export problem to Excel Pin
ivo755-Feb-09 10:55
ivo755-Feb-09 10:55 
QuestionDissable security message "" A program is trying to access e-mail addresses" while sending email Pin
Amanjot5-Feb-09 8:07
Amanjot5-Feb-09 8:07 
AnswerRe: Dissable security message "" A program is trying to access e-mail addresses" while sending email Pin
Wendelius5-Feb-09 8:16
mentorWendelius5-Feb-09 8:16 
AnswerRe: Dissable security message "" A program is trying to access e-mail addresses" while sending email Pin
Bharat Jain5-Feb-09 18:36
Bharat Jain5-Feb-09 18:36 
QuestionBuild a firewall using VB.net and then open traffic after web-based sign-in Pin
GDMFSOB5-Feb-09 7:08
GDMFSOB5-Feb-09 7:08 
AnswerRe: Build a firewall using VB.net and then open traffic after web-based sign-in Pin
EliottA5-Feb-09 7:20
EliottA5-Feb-09 7:20 
AnswerRe: Build a firewall using VB.net and then open traffic after web-based sign-in Pin
Dave Kreskowiak5-Feb-09 9:16
mveDave Kreskowiak5-Feb-09 9:16 
QuestionListbox problem Pin
jaakinye5-Feb-09 6:21
jaakinye5-Feb-09 6:21 
AnswerRe: Listbox problem Pin
EliottA5-Feb-09 6:42
EliottA5-Feb-09 6:42 
AnswerRe: Listbox problem Pin
vaghelabhavesh5-Feb-09 10:01
vaghelabhavesh5-Feb-09 10:01 
GeneralRe: Listbox problem Pin
jaakinye5-Feb-09 16:07
jaakinye5-Feb-09 16:07 

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.