0

I hope this little code can be use for some one

MyDate = Date
MyWeek = DatePart("ww", Now, vbMonday, vbFirstFourDays)

   Label3VWEEK.Caption = "Week  " & MyWeek
   LabelDATE.Caption = StrConv(Format$(MyDate, "dddd dd mmmm  yyyy"), vbProperCase)
   LabelDATE.Caption = Format(Now, "y :\e \d\a\y\ o\f \t\h\e  y\e\a\r ")
'I use  to extract the namedays of the YEAR IN TO AN TEXT BOX WITH IS MADE OF AN *.txt FILE
'TO GET HE RIGHT NAME FOR THE DAY
'aND THIS EXTRACT THE NAMES iN Swedish 

      Fnum = FreeFile
       iDag = Format$(Date, "dd-mm")
    
Open App.Path & "\Namnsdagarse.txt" For Input As #Fnum
 Do Until EOF(Fnum)
      Line Input #Fnum, namn
   If Left$(namn, 5) = iDag Then
      'namn = Replace(namn, ",", " o ")
      strLen = Len(namn)
     Text1SE.Text = Right$(namn, strLen - 6)
     
     
     Label2.Caption = "Idag  " '& Left$(iDag, 2) & "  " & ConvToStr(Right$(iDag, 2))'''Sverige
     Label3.Caption = "Idag  " '& Left$(iDag, 2) & "  " & ConvToStr(Right$(iDag, 2))'''Grekland

          Exit Do
        End If
      Loop
Close #Fnum

Create an *.txt file and use it at this
01-01 Garry ( exampel )and so on for 366 days even with holidays, seperate with a comma

Edited by Narue: Added code tags

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by bonzo2008
0

Sorry folk's label3,caption should not to be there If You like more namedays of the year open as before and rename the *. txt file to what ever you like
and open it seperatly,, THanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.