Prev: Number of lines in the Immediate Window
Next: retrieve data into a spreadsheet from a copy of that spreadsheetw
From: Hennie Neuhoff on 20 May 2010 01:34 Hi. Guys, Excel 2003 - I've got a calendar on a userform displaying January 2010 This is my code: Ualmanak.Caption = "Kies die besprekingsdatum." Ualmanak.Calendar1.Today '<------ This works fine and highlight today's date 'Ualmanak.Calendar1.nextyear '<------ this display the calendar as January 2011 'Ualmanak.Calendar1.nextmonth '<------ this display the calendar as February 2010 Ualmanak.Show If Not bContinue Then End On Error GoTo fout With Ualmanak.Calendar1 Range("BronInlig!Datkies").Value = .Value End With Unload Ualmanak Exit Sub fout: MsgBox "Die fasiliteit is nie op jou rekenaar aktief nie - sien Hulp" _ , vbInformation, Title:="Fasiliteit nie geinstalleer." End End Sub My question - how do I "update" the calendar on the userform ? Or alternatively if today = 19 May 2010 and I use either: Ualmanak.Calendar1.nextyear '<------May 2011 must be displayed on the Userform Ualmanak.Calendar1.nextmonth '<------ June 2010 must be displayed I know there's some ways around this, I also know some smartass in our orgnisation would change the calender's date [Jan 2010] on the userform. -- HJN
From: Jacob Skaria on 20 May 2010 03:08 Not sure whether I have understood you correctly. Try Me.Calendar1.Value = Date Me.Calendar1.NextMonth OR Me.Calendar1.Value = Date Me.Calendar1.NextYear -- Jacob (MVP - Excel) "Hennie Neuhoff" wrote: > Hi. Guys, > Excel 2003 - I've got a calendar on a userform displaying January 2010 > This is my code: > > Ualmanak.Caption = "Kies die besprekingsdatum." > Ualmanak.Calendar1.Today '<------ This works fine and highlight today's > date > 'Ualmanak.Calendar1.nextyear '<------ this display the calendar as > January 2011 > 'Ualmanak.Calendar1.nextmonth '<------ this display the calendar as > February 2010 > Ualmanak.Show > If Not bContinue Then End > On Error GoTo fout > With Ualmanak.Calendar1 > Range("BronInlig!Datkies").Value = .Value > End With > Unload Ualmanak > Exit Sub > fout: > MsgBox "Die fasiliteit is nie op jou rekenaar aktief nie - sien Hulp" _ > , vbInformation, Title:="Fasiliteit nie geinstalleer." > End > End Sub > > My question - how do I "update" the calendar on the userform ? Or > alternatively if today = 19 May 2010 and I use either: > Ualmanak.Calendar1.nextyear '<------May 2011 must be displayed on the > Userform > Ualmanak.Calendar1.nextmonth '<------ June 2010 must be displayed > > I know there's some ways around this, I also know some smartass in our > orgnisation would change the calender's date [Jan 2010] on the userform. > > -- > HJN
From: Hennie Neuhoff on 20 May 2010 03:19 Jacob - thanks very much. I replaced the "Date" with "Today' -it works perfect. Thanks again -- HJN "Jacob Skaria" wrote: > Not sure whether I have understood you correctly. Try > > Me.Calendar1.Value = Date > Me.Calendar1.NextMonth > > OR > > Me.Calendar1.Value = Date > Me.Calendar1.NextYear > > -- > Jacob (MVP - Excel) > > > "Hennie Neuhoff" wrote: > > > Hi. Guys, > > Excel 2003 - I've got a calendar on a userform displaying January 2010 > > This is my code: > > > > Ualmanak.Caption = "Kies die besprekingsdatum." > > Ualmanak.Calendar1.Today '<------ This works fine and highlight today's > > date > > 'Ualmanak.Calendar1.nextyear '<------ this display the calendar as > > January 2011 > > 'Ualmanak.Calendar1.nextmonth '<------ this display the calendar as > > February 2010 > > Ualmanak.Show > > If Not bContinue Then End > > On Error GoTo fout > > With Ualmanak.Calendar1 > > Range("BronInlig!Datkies").Value = .Value > > End With > > Unload Ualmanak > > Exit Sub > > fout: > > MsgBox "Die fasiliteit is nie op jou rekenaar aktief nie - sien Hulp" _ > > , vbInformation, Title:="Fasiliteit nie geinstalleer." > > End > > End Sub > > > > My question - how do I "update" the calendar on the userform ? Or > > alternatively if today = 19 May 2010 and I use either: > > Ualmanak.Calendar1.nextyear '<------May 2011 must be displayed on the > > Userform > > Ualmanak.Calendar1.nextmonth '<------ June 2010 must be displayed > > > > I know there's some ways around this, I also know some smartass in our > > orgnisation would change the calender's date [Jan 2010] on the userform. > > > > -- > > HJN
From: Rick Rothstein on 20 May 2010 03:47 > Jacob - thanks very much. I replaced the "Date" with "Today' -it works > perfect. You did? And it worked? How... Today is not a VB function? -- Rick (MVP - Excel) "Hennie Neuhoff" <HennieNeuhoff(a)discussions.microsoft.com> wrote in message news:F69434D3-6060-4F93-9004-83AD8F14F79B(a)microsoft.com... > Jacob - thanks very much. I replaced the "Date" with "Today' -it works > perfect. > Thanks again > -- > HJN > > > "Jacob Skaria" wrote: > >> Not sure whether I have understood you correctly. Try >> >> Me.Calendar1.Value = Date >> Me.Calendar1.NextMonth >> >> OR >> >> Me.Calendar1.Value = Date >> Me.Calendar1.NextYear >> >> -- >> Jacob (MVP - Excel) >> >> >> "Hennie Neuhoff" wrote: >> >> > Hi. Guys, >> > Excel 2003 - I've got a calendar on a userform displaying January 2010 >> > This is my code: >> > >> > Ualmanak.Caption = "Kies die besprekingsdatum." >> > Ualmanak.Calendar1.Today '<------ This works fine and highlight >> > today's >> > date >> > 'Ualmanak.Calendar1.nextyear '<------ this display the calendar as >> > January 2011 >> > 'Ualmanak.Calendar1.nextmonth '<------ this display the calendar as >> > February 2010 >> > Ualmanak.Show >> > If Not bContinue Then End >> > On Error GoTo fout >> > With Ualmanak.Calendar1 >> > Range("BronInlig!Datkies").Value = .Value >> > End With >> > Unload Ualmanak >> > Exit Sub >> > fout: >> > MsgBox "Die fasiliteit is nie op jou rekenaar aktief nie - sien Hulp" _ >> > , vbInformation, Title:="Fasiliteit nie geinstalleer." >> > End >> > End Sub >> > >> > My question - how do I "update" the calendar on the userform ? Or >> > alternatively if today = 19 May 2010 and I use either: >> > Ualmanak.Calendar1.nextyear '<------May 2011 must be displayed on the >> > Userform >> > Ualmanak.Calendar1.nextmonth '<------ June 2010 must be displayed >> > >> > I know there's some ways around this, I also know some smartass in our >> > orgnisation would change the calender's date [Jan 2010] on the >> > userform. >> > >> > -- >> > HJN
From: Hennie Neuhoff on 20 May 2010 06:02
Rick, I used Ualmanak.Calendar1.Today -- HJN "Rick Rothstein" wrote: > > Jacob - thanks very much. I replaced the "Date" with "Today' -it works > > perfect. > > You did? And it worked? How... Today is not a VB function? > > -- > Rick (MVP - Excel) > > > > "Hennie Neuhoff" <HennieNeuhoff(a)discussions.microsoft.com> wrote in message > news:F69434D3-6060-4F93-9004-83AD8F14F79B(a)microsoft.com... > > Jacob - thanks very much. I replaced the "Date" with "Today' -it works > > perfect. > > Thanks again > > -- > > HJN > > > > > > "Jacob Skaria" wrote: > > > >> Not sure whether I have understood you correctly. Try > >> > >> Me.Calendar1.Value = Date > >> Me.Calendar1.NextMonth > >> > >> OR > >> > >> Me.Calendar1.Value = Date > >> Me.Calendar1.NextYear > >> > >> -- > >> Jacob (MVP - Excel) > >> > >> > >> "Hennie Neuhoff" wrote: > >> > >> > Hi. Guys, > >> > Excel 2003 - I've got a calendar on a userform displaying January 2010 > >> > This is my code: > >> > > >> > Ualmanak.Caption = "Kies die besprekingsdatum." > >> > Ualmanak.Calendar1.Today '<------ This works fine and highlight > >> > today's > >> > date > >> > 'Ualmanak.Calendar1.nextyear '<------ this display the calendar as > >> > January 2011 > >> > 'Ualmanak.Calendar1.nextmonth '<------ this display the calendar as > >> > February 2010 > >> > Ualmanak.Show > >> > If Not bContinue Then End > >> > On Error GoTo fout > >> > With Ualmanak.Calendar1 > >> > Range("BronInlig!Datkies").Value = .Value > >> > End With > >> > Unload Ualmanak > >> > Exit Sub > >> > fout: > >> > MsgBox "Die fasiliteit is nie op jou rekenaar aktief nie - sien Hulp" _ > >> > , vbInformation, Title:="Fasiliteit nie geinstalleer." > >> > End > >> > End Sub > >> > > >> > My question - how do I "update" the calendar on the userform ? Or > >> > alternatively if today = 19 May 2010 and I use either: > >> > Ualmanak.Calendar1.nextyear '<------May 2011 must be displayed on the > >> > Userform > >> > Ualmanak.Calendar1.nextmonth '<------ June 2010 must be displayed > >> > > >> > I know there's some ways around this, I also know some smartass in our > >> > orgnisation would change the calender's date [Jan 2010] on the > >> > userform. > >> > > >> > -- > >> > HJN > > . > |