Click here to Skip to main content
15,890,382 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Program running in the background in VB Pin
Dave Kreskowiak29-Jun-07 13:13
mveDave Kreskowiak29-Jun-07 13:13 
Questionupdate textbox Pin
shrihit29-Jun-07 10:15
shrihit29-Jun-07 10:15 
AnswerRe: update textbox Pin
Dave Kreskowiak29-Jun-07 13:25
mveDave Kreskowiak29-Jun-07 13:25 
AnswerRe: update textbox Pin
shrihit3-Jul-07 3:28
shrihit3-Jul-07 3:28 
QuestionConcatenate data from DataTable Pin
HurricaneDan29-Jun-07 9:58
HurricaneDan29-Jun-07 9:58 
AnswerRe: Concatenate data from DataTable Pin
Bassam Saoud29-Jun-07 10:24
Bassam Saoud29-Jun-07 10:24 
GeneralRe: Concatenate data from DataTable Pin
HurricaneDan29-Jun-07 10:29
HurricaneDan29-Jun-07 10:29 
QuestionLate binding question Pin
jhoga29-Jun-07 4:24
jhoga29-Jun-07 4:24 
I am trying to rid myself of the problem of different version being used for excel on my customers machines. I have several programs the have a feature that allows the data sets to be save into excel. Using the interop and early binding gives me a problem with the office version, on the users machine. So I know to fix this I should use late binding. I don't really understand how to do this. I understand the concept, but can't quite get the method of execution right. Here is an example of my code:
Private Sub createSpreadSheet()
Dim EXL As Object
Dim wsheet As New Worksheet
Dim da As New SqlDataAdapter
EXL = CreateObject("excel.application")
wsheet = EXL.Workbooks.Add.Worksheets.Add
wsheet = EXL.Workbooks.Item(1).Worksheets("Sheet1")
Dim str1 As String
Dim intCount As Integer
intCount = Label57.Text - 1
Dim checkHeader As String
Dim I As Integer
For I = 0 To 5
checkHeader = strHead(I)
Select Case checkHeader
Case "wo_num"
strHead(I) = "Work Order"
strCwidth(I) = 100
Case "status_description"
strHead(I) = "Status"
strCwidth(I) = 100
Case "priority_description"
strHead(I) = "Priorty"
strCwidth(I) = 100
Case "category_description"
strHead(I) = "Category"
strCwidth(I) = 100
Case "location_description"
strHead(I) = "Location"
strCwidth(I) = 130
Case "wo_user"
strHead(I) = "Requested By"
strCwidth(I) = 130
Case "wo_in_date"
strHead(I) = "Date Entered"
strCwidth(I) = 130
Case "wo_date_needed"
strHead(I) = "Date Needed"
strCwidth(I) = 130
Case "wo_fixed_date"
strHead(I) = "Date Repaired"
strCwidth(I) = 140
Case "wo_description"
strHead(I) = "Description"
strCwidth(I) = 560
Case "wo_detailed_location"
strHead(I) = "Detailed Location"
strCwidth(I) = 330
Case "wo_est_time"
strHead(I) = "Est. Time"
strCwidth(I) = 130
Case "wo_act_time"
strHead(I) = "Act. Time"
strCwidth(I) = 130
Case "wo_resolution_notes"
strHead(I) = "Notes"
strCwidth(I) = 560
Case "wo_internal_comments"
strHead(I) = "Internal Comments"
strCwidth(I) = 560

End Select
wsheet.Cells(2, I + 1) = strHead(I)
Dim Q As Integer
For Q = 0 To intCount
wsheet.Cells(Q + 3, I + 1) = strP(I, Q)
Next Q
Next I
With wsheet
.Cells(1, 1) = "Custom Report"
End With
wsheet.SaveAs("C:\FM\FM.XLS")
EXL.Workbooks(1).Close(SaveChanges:=False)
If you can help I would be truly greatful. Smile | :)
AnswerRe: Late binding question Pin
Dave Kreskowiak29-Jun-07 5:02
mveDave Kreskowiak29-Jun-07 5:02 
QuestionCode reuse Pin
HurricaneDan29-Jun-07 4:18
HurricaneDan29-Jun-07 4:18 
AnswerRe: Code reuse Pin
Dave Kreskowiak29-Jun-07 4:46
mveDave Kreskowiak29-Jun-07 4:46 
GeneralRe: Code reuse Pin
HurricaneDan29-Jun-07 5:00
HurricaneDan29-Jun-07 5:00 
GeneralRe: Code reuse Pin
Dave Kreskowiak29-Jun-07 7:24
mveDave Kreskowiak29-Jun-07 7:24 
GeneralRe: Code reuse Pin
HurricaneDan29-Jun-07 7:32
HurricaneDan29-Jun-07 7:32 
GeneralRe: Code reuse Pin
Dave Kreskowiak29-Jun-07 7:45
mveDave Kreskowiak29-Jun-07 7:45 
GeneralRe: Code reuse Pin
HurricaneDan29-Jun-07 9:04
HurricaneDan29-Jun-07 9:04 
GeneralRe: Code reuse Pin
kubben29-Jun-07 8:01
kubben29-Jun-07 8:01 
GeneralRe: Code reuse Pin
HurricaneDan29-Jun-07 8:26
HurricaneDan29-Jun-07 8:26 
Questionhow can I deploy a vb.net application that is connecting to database? Pin
akramicoooo29-Jun-07 3:50
akramicoooo29-Jun-07 3:50 
AnswerRe: how can I deploy a vb.net application that is connecting to database? Pin
kubben29-Jun-07 3:53
kubben29-Jun-07 3:53 
AnswerRe: how can I deploy a vb.net application that is connecting to database? Pin
Dave Kreskowiak29-Jun-07 4:40
mveDave Kreskowiak29-Jun-07 4:40 
QuestionSave file from PDA to remote computer Pin
k.giannis_198029-Jun-07 3:05
k.giannis_198029-Jun-07 3:05 
AnswerRe: Save file from PDA to remote computer Pin
Dave Kreskowiak29-Jun-07 4:38
mveDave Kreskowiak29-Jun-07 4:38 
GeneralRe: Save file from PDA to remote computer Pin
k.giannis_198029-Jun-07 5:51
k.giannis_198029-Jun-07 5:51 
QuestionDateTime.Parse fails at VB2005 Pin
TotalTops197229-Jun-07 2:55
TotalTops197229-Jun-07 2:55 

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.