Click here to Skip to main content
15,907,326 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSMTP email (gmail) Pin
Amanjot17-Feb-09 16:05
Amanjot17-Feb-09 16:05 
AnswerRe: SMTP email (gmail) Pin
Christian Graus17-Feb-09 16:07
protectorChristian Graus17-Feb-09 16:07 
GeneralRe: SMTP email (gmail) Pin
εїзεїзεїз15-Feb-10 1:51
εїзεїзεїз15-Feb-10 1:51 
AnswerRe: SMTP email (gmail) Pin
Hassan Eido17-Feb-09 21:06
Hassan Eido17-Feb-09 21:06 
GeneralRe: SMTP email (gmail) Pin
Amanjot18-Feb-09 7:07
Amanjot18-Feb-09 7:07 
GeneralRe: SMTP email (gmail) Pin
Bharat Jain19-Feb-09 0:30
Bharat Jain19-Feb-09 0:30 
QuestionNot so much a programming question, more a kind of please explain why... Pin
Dalek Dave17-Feb-09 5:16
professionalDalek Dave17-Feb-09 5:16 
QuestionVBA for Excel Need Help Debugging Date Conversion Pin
codeslingerCA17-Feb-09 4:13
codeslingerCA17-Feb-09 4:13 
I have an Excel spreadsheet which contains some dates that need to be converted using the function JDE2Date. It appears to work - but i get a runtime erroe 1004 Application-defined or object defined error on row 18,059. The value of the cell shows as -699947. My application crashed there. Any Ideas?







Private Sub Worksheet_Activate()





Dim rowcount As Long


For rowcount = 2 To Me.Rows.Count
Dim value As String

value = Range("D" & rowcount).value
Range("D" & rowcount).value = JDE2Date(value)
Next



rowcount = 0
value = ""
For rowcount = 2 To Me.Rows.Count


value = Range("E" & rowcount).value
Range("E" & rowcount).value = JDE2Date(value)
Next



End Sub


Public Function JDE2Date(ByVal plngDate As Long) As Date
' This Function takes a JDE Julian Date and Converts it to a Microsoft Date
Dim lngYear As Long
Dim lngDay As Long
Dim dtFirstDayOfYear As Date

' Calculate Date
lngDay = plngDate Mod 1000
lngYear = ((plngDate - lngDay) / 1000) + 1900
dtFirstDayOfYear = CDate("1/1/" & lngYear)
lngDay = lngDay - 1

JDE2Date = dtFirstDayOfYear + lngDay

End Function
AnswerRe: VBA for Excel Need Help Debugging Date Conversion Pin
Dave Kreskowiak18-Feb-09 3:58
mveDave Kreskowiak18-Feb-09 3:58 
Questionload report failed while crystal report running in visual studio 2005 Pin
NaliniNagarajan17-Feb-09 2:18
NaliniNagarajan17-Feb-09 2:18 
AnswerRe: load report failed while crystal report running in visual studio 2005 Pin
tosch17-Feb-09 4:27
tosch17-Feb-09 4:27 
Generalprogress bar Pin
Aamir Mustafa17-Feb-09 1:24
Aamir Mustafa17-Feb-09 1:24 
GeneralRe: progress bar Pin
Ashfield17-Feb-09 1:32
Ashfield17-Feb-09 1:32 
QuestionDrag-arrow on usercontrol in designer Pin
vigylant16-Feb-09 23:43
vigylant16-Feb-09 23:43 
QuestionVBScript logoff Pin
JR21216-Feb-09 22:27
JR21216-Feb-09 22:27 
AnswerRe: VBScript logoff Pin
DaveAuld16-Feb-09 23:20
professionalDaveAuld16-Feb-09 23:20 
GeneralRe: VBScript logoff Pin
JR21216-Feb-09 23:34
JR21216-Feb-09 23:34 
AnswerRe: VBScript logoff Pin
Dave Kreskowiak17-Feb-09 3:49
mveDave Kreskowiak17-Feb-09 3:49 
GeneralRe: VBScript logoff Pin
JR21217-Feb-09 21:14
JR21217-Feb-09 21:14 
GeneralRe: VBScript logoff Pin
Dave Kreskowiak18-Feb-09 2:13
mveDave Kreskowiak18-Feb-09 2:13 
Questionhexa Pin
aswd16-Feb-09 21:11
aswd16-Feb-09 21:11 
AnswerRe: hexa Pin
DaveAuld16-Feb-09 23:23
professionalDaveAuld16-Feb-09 23:23 
GeneralRe: hexa Pin
aswd17-Feb-09 5:03
aswd17-Feb-09 5:03 
GeneralRe: hexa Pin
EliottA17-Feb-09 5:35
EliottA17-Feb-09 5:35 
GeneralRe: hexa Pin
DaveAuld17-Feb-09 5:55
professionalDaveAuld17-Feb-09 5: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.