ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,731
- Office Version
- 2007
- Platform
- Windows
Hi,
On my userform in TextBox 8 i have coded to show the current date.
For some reason it shows tomorrows date as opposed todays date ?
Please see attached screenshot
This is the code in use & line of code shown in Red.
On my userform in TextBox 8 i have coded to show the current date.
For some reason it shows tomorrows date as opposed todays date ?
Please see attached screenshot
This is the code in use & line of code shown in Red.
Rich (BB code):
Private Sub Userform_Initialize()
Dim s As Worksheet, b1 As Range, b2 As Range
TextBox2.Visible = False
TextBox3.Visible = False
TextBox4.Visible = False
TextBox5.Visible = False
TextBox6.Visible = False
TextBox7.Visible = False
OptionButton1.Visible = False
OptionButton2.Visible = False
OptionButton3.Visible = False
OptionButton4.Visible = False
TextBox8.Value = Format(Date, "mm/dd/yyyy")
Me.StartUpPosition = 0
Me.Top = Application.Top + 200 ' MARGIN FROM TOP OF SCREEN
Me.Left = Application.Left + Application.Width - Me.Width - 150 ' LEFT / RIGHT OF SCREEN
With GetObject("C:\Users\Ian\Desktop\REMOTES ETC\DR\DR.xlsm")
Set s = .Sheets("POSTAGE")
Set b2 = s.Cells(s.Range("B" & s.UsedRange.Rows.Count + 1).End(xlUp).Row, "B")
Set b1 = b2.Offset(-5, 0)
ComboBox1.List = s.Range(b1, b2).Value
.Close 0
End With
End Sub