Click here to Skip to main content
16,005,037 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionLazy Evaluation ternary op? Pin
eidylon3-Apr-03 9:11
eidylon3-Apr-03 9:11 
AnswerRe: Lazy Evaluation ternary op? Pin
Daniel Turini3-Apr-03 9:25
Daniel Turini3-Apr-03 9:25 
GeneralRe: Lazy Evaluation ternary op? Pin
mikasa3-Apr-03 10:44
mikasa3-Apr-03 10:44 
GeneralRe: Lazy Evaluation ternary op? Pin
Daniel Turini3-Apr-03 10:48
Daniel Turini3-Apr-03 10:48 
GeneralRe: Lazy Evaluation ternary op? Pin
mikasa3-Apr-03 10:57
mikasa3-Apr-03 10:57 
GeneralPrintPreview Question 2 Pin
Fleischen3-Apr-03 5:52
Fleischen3-Apr-03 5:52 
GeneralAccess Visual Basic References Pin
Kogorman3-Apr-03 5:17
Kogorman3-Apr-03 5:17 
GeneralRe: Access Visual Basic References Pin
mikasa3-Apr-03 10:50
mikasa3-Apr-03 10:50 
No, your best best is to Code using "Late Binding" methods. All you have to do is get rid of your References when you are sure that the Code works, then Change every Variable to Type "Object". This way it will work no matter what Version of MS Office plus you can trap Errors to determine if Office is not installed.

For example:
On Error Goto ErrHandler
Dim xlApp As Excel.Application  'Error will Occur here when not installed
Set xlApp = New Excel.Application 

ErrHandler:
     If (Err.Number <> 0) Then
          'Of course, determine the Correct Error Number for this...
          MsgBox "Excel is not Installed!"
     End If


Now, change it to this after removing all References to Excel:
On Error Goto ErrHandler
Dim xlApp As Object  
Set xlApp = CreateObject("Excel.Application")  'Error will Occur here when not installed

ErrHandler:
     If (Err.Number <> 0) Then
          'Of course, determine the Correct Error Number for this...
          MsgBox "Excel is not Installed!"
     End If

GeneralVB 2 VB.NET Pin
Oscar Martin3-Apr-03 2:27
Oscar Martin3-Apr-03 2:27 
GeneralRe: VB 2 VB.NET Pin
mikasa3-Apr-03 10:59
mikasa3-Apr-03 10:59 
GeneralRe: VB 2 VB.NET Pin
mikasa3-Apr-03 11:00
mikasa3-Apr-03 11:00 
GeneralRe: VB 2 VB.NET Pin
Oscar Martin3-Apr-03 11:07
Oscar Martin3-Apr-03 11:07 
GeneralUse DLL in VBasic Pin
Martin_Viet3-Apr-03 1:44
Martin_Viet3-Apr-03 1:44 
GeneralRe: Use DLL in VBasic Pin
Villly3-Apr-03 1:52
Villly3-Apr-03 1:52 
GeneralRe: Use DLL in VBasic Pin
Martin_Viet3-Apr-03 2:26
Martin_Viet3-Apr-03 2:26 
GeneralRe: Use DLL in VBasic Pin
Oscar Martin3-Apr-03 2:37
Oscar Martin3-Apr-03 2:37 
GeneralRe: Use DLL in VBasic Pin
Martin_Viet3-Apr-03 4:01
Martin_Viet3-Apr-03 4:01 
GeneralRe: Use DLL in VBasic Pin
Nick Parker3-Apr-03 4:35
protectorNick Parker3-Apr-03 4:35 
GeneralRe: Use DLL in VBasic Pin
Martin_Viet3-Apr-03 5:05
Martin_Viet3-Apr-03 5:05 
GeneralRe: Use DLL in VBasic Pin
Oscar Martin3-Apr-03 6:04
Oscar Martin3-Apr-03 6:04 
GeneralRe: Use DLL in VBasic Pin
Nick Parker3-Apr-03 7:14
protectorNick Parker3-Apr-03 7:14 
GeneralRe: Use DLL in VBasic Pin
Villly4-Apr-03 0:16
Villly4-Apr-03 0:16 
GeneralRe: Use DLL in VBasic Pin
Martin_Viet4-Apr-03 6:03
Martin_Viet4-Apr-03 6:03 
GeneralRe: Use DLL in VBasic Pin
Rob McBean4-Apr-03 13:28
Rob McBean4-Apr-03 13:28 
GeneralIDM_SHVIEW_NEWFOLDER Usage in Web Browser control Pin
Villly3-Apr-03 1:27
Villly3-Apr-03 1:27 

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.