Click here to Skip to main content
15,921,028 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Flippable 3D List Items in WPF Pin
ChandraRam29-Jul-08 1:23
ChandraRam29-Jul-08 1:23 
GeneralRe: Flippable 3D List Items in WPF Pin
sumeetneo29-Jul-08 4:24
sumeetneo29-Jul-08 4:24 
QuestionDon't load .ocx at runtime Pin
cstrader23228-Jul-08 9:44
cstrader23228-Jul-08 9:44 
GeneralRe: Don't load .ocx at runtime Pin
Paul Conrad28-Jul-08 9:54
professionalPaul Conrad28-Jul-08 9:54 
GeneralRe: Don't load .ocx at runtime Pin
cstrader23228-Jul-08 10:07
cstrader23228-Jul-08 10:07 
Questioncreate button programmatically for loop Pin
khm628-Jul-08 9:00
khm628-Jul-08 9:00 
AnswerRe: create button programmatically for loop Pin
Steven J Jowett28-Jul-08 10:18
Steven J Jowett28-Jul-08 10:18 
QuestionSearch/Evaluate My.Settings.StringCollection Pin
Member 437233128-Jul-08 8:12
Member 437233128-Jul-08 8:12 
I wrote a "widget" to report sales data, etc. I need to make some calculations based on business days to date this month. Business days are Mon-Fri, minus any holidays. Holidays are defined in my.settings, using a string collection. The function below iterates through the days of the current month until it reaches today. For each iteration, it checks to see if the day is a weekday, then checks to see if it is listed in my.settings.holidays. If it is a weekday, and not a holiday, the counter is incremented. If it is a holiday I receive a message "Holiday". This works exactly as I expect on my dev machine. However, when running the widget on any other machine, the "IF" statement that checks the holidays never evaluates to true. Any ideas anybody? Am I missing an import statement?

Protected Overridable Function CountBusinessDays() As Integer
    Dim BusDays As Integer
    Dim RefMonth As Integer = Month(Now)
    Dim CalcDate As Date = DateSerial(Year(Now), Month(Now), 1)
    Do While Month(CalcDate) = RefMonth
        Dim wkday As Integer = Weekday(CalcDate)
        If wkday <> 1 And wkday <> 7 Then
            If Not My.Settings.Holiday.Contains(CalcDate.ToString) Then
                BusDays = (BusDays + 1)
            Else : MsgBox("Holiday") 'For testing....
            End If
        End If
        If CalcDate = Date.Today Then Exit Do
        CalcDate = CalcDate.AddDays(1)
    Loop
    Return BusDays
End Function


We use Visual Studio 2005, and have .Net framework 3.5 installed on all machines.
AnswerRe: Search/Evaluate My.Settings.StringCollection Pin
paas29-Jul-08 0:47
paas29-Jul-08 0:47 
GeneralRe: Search/Evaluate My.Settings.StringCollection Pin
Member 437233129-Jul-08 2:41
Member 437233129-Jul-08 2:41 
GeneralRe: Search/Evaluate My.Settings.StringCollection Pin
paas29-Jul-08 3:26
paas29-Jul-08 3:26 
GeneralRe: Search/Evaluate My.Settings.StringCollection Pin
Member 437233129-Jul-08 3:38
Member 437233129-Jul-08 3:38 
QuestionExport to Excel or html [modified] Pin
zzsoulzz28-Jul-08 7:27
zzsoulzz28-Jul-08 7:27 
AnswerRe: Export to Excel or html Pin
Paul Conrad28-Jul-08 10:50
professionalPaul Conrad28-Jul-08 10:50 
GeneralRe: Export to Excel or html Pin
zzsoulzz28-Jul-08 20:19
zzsoulzz28-Jul-08 20:19 
GeneralRe: Export to Excel or html Pin
Paul Conrad28-Jul-08 20:22
professionalPaul Conrad28-Jul-08 20:22 
GeneralRe: Export to Excel or html Pin
zzsoulzz28-Jul-08 20:32
zzsoulzz28-Jul-08 20:32 
QuestionString concat slow despite Stringbuilder Pin
frylord28-Jul-08 4:20
frylord28-Jul-08 4:20 
AnswerRe: String concat slow despite Stringbuilder Pin
Roger Alsing28-Jul-08 4:44
Roger Alsing28-Jul-08 4:44 
AnswerRe: String concat slow despite Stringbuilder Pin
Luc Pattyn28-Jul-08 5:18
sitebuilderLuc Pattyn28-Jul-08 5:18 
GeneralRe: String concat slow despite Stringbuilder Pin
frylord28-Jul-08 5:59
frylord28-Jul-08 5:59 
AnswerRe: String concat slow despite Stringbuilder Pin
Chinners28-Jul-08 5:33
Chinners28-Jul-08 5:33 
GeneralRe: String concat slow despite Stringbuilder Pin
frylord28-Jul-08 6:01
frylord28-Jul-08 6:01 
AnswerRe: String concat slow despite Stringbuilder Pin
Paul Conrad28-Jul-08 5:52
professionalPaul Conrad28-Jul-08 5:52 
GeneralRe: String concat slow despite Stringbuilder Pin
frylord28-Jul-08 6:08
frylord28-Jul-08 6:08 

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.