Amor.estranho.amor.-love.strange.love-.1982.vhs... 〈2026 Edition〉
On this page I show how to make a calendar and date picker on an Excel userform using VBA only and no ActiveX.
This is how it looks in the Danish version of Excel 2003:
In the U.S.A (English), where the first day of the week is Sunday and not Monday, the "day labels" from left to right will be SU, MO, TU, WE, TH, FR and SA, and February 1st 2016 will be in the second column, below MO.
In other words it is sensitive to the system's language and first day of the week settings. The possible date formats are also based on the system settings.
By using VBA only and no ActiveX you avoid compatibility problems, because different MS Office versions use different ActiveX controls for calendars.
You can use the calendar to select (up to) two dates for whatever purpose you want. The selected dates are put in two labels, and if you click one of these labels, you can copy the date to a cell or a range of cells.
I show and explain some of the macros below, but I cannot show them all. If you want to see the rest, you can download a zip compressed workbook with the example.
The workbook was updated with a minor bug fix February 26th 2017.
The calendar is on a userform (see image above) with a frame, labels, combo boxes and command buttons.
For event handling (when the user selects a date) the calendar uses a simple class module instead of writing a click procedure for each and every date label.
Of course it also uses quite a few date functions like getting the first day of the week, first day of the month, weekday names in the user's language, checking for leap year etc.
I am a lousy designer, so change the userform's look as you like; but unless you change the code, the labels for date picking must all be in Frame1.
The Collections
There are two public collections declared in Module1: colLabelEvent and colLabels, and the calendar's date labels are members of both collections.
colLabelEvent is a collection of the event handler classes for the labels, and colLabels enables us to change the properties of each label like e.g.:
colLabels.Item(variable for label name).Visible = False
We'll get back to the event handling class - it is really not complicated.
The userform's Initialize procedure
A userform's Initialize procedure executes before the form opens, and below you can see how it looks in the calendar userform.
Anna lives in a very fancy, expensive brothel. She is the favorite woman of a powerful politician named Dr. Osmar.
: Even in low-quality VHS rips, the film’s decadent, atmospheric production design—capturing the 1930s—is notable.
The keyword string is a digital artifact of this censorship era.
The film dares to ask: in a society where children are exploited, women are commodified, and the state is run as a private enterprise, what is love? The answer it suggests, reflected in its title, is that in such a world, love inevitably becomes a strange, deformed, and damaging perversion of human connection. Amor.Estranho.Amor.-Love.Strange.Love-.1982.VHS...
While the film featured established icons like Vera Fischer—who won Best Actress at the Festival de Brasília for her role—it was a minor supporting actress who fundamentally changed the film's destiny.
Suggested Further Research Directions (brief)
Confined mostly to a bedroom and the corridors of the mansion, young Hugo is thrust into a world of adult sexuality. He witnesses the psychological decay of the women working there and becomes the target of a bizarre, uncomfortable sexual awakening involving his mother and Tamara (Xuxa Meneghel), a newly arrived girl bought to satisfy a visiting diplomat. Amor Estranho Amor (1982) - IMDb Anna lives in a very fancy, expensive brothel
In 2018, Xuxa changed her mind. After years of legal battles, she finally gave up her fight, stating she no longer wanted to spend millions to keep the film hidden. In February 2021, in a historic broadcast, Canal Brasil finally aired the film on television for the first time. At the time, Xuxa had a new perspective, saying, "Who hasn't seen it, please watch it," arguing that the film's message was an anti-pedophilia critique, not a defense of it. Her goal was to reclaim the narrative, but the film's strange, uncontrollable power had already been unleashed.
To this day, Love Strange Love remains a Rorschach test. Does it exploit a child actor, or does it denounce the exploitation of minors? Is it a high-brow art film dressed in cheap clothes, or a porno disguised as social criticism? Even its lead actress, Vera Fischer, has publicly criticized Xuxa for trying to bury the film, accusing her of harming Brazilian cinema. Xuxa, for her part, has stated she suffers from the association with pedophilia, calling it "fake news" with a "touch of cruelty," as she argued in interviews about the documentary of her life.
The question every archivist asks: Should a film this uncomfortable be preserved? The forces the issue. By existing only on fugitive analog media, the film escapes the algorithmic curation of modern streaming services. You cannot stumble upon it on Netflix. You must seek it. : Even in low-quality VHS rips, the film’s
The narrative is framed as an extensive flashback. An adult man named Hugo recalls a pivotal 48-hour window from his childhood in 1937, just as the real-world political landscape of Brazil was undergoing a massive shift under Getúlio Vargas. As a 12-year-old boy (played by Marcelo Ribeiro), Hugo is sent to live with his mother, Anna (Vera Fischer), who resides in a highly luxurious, elite bordello in São Paulo. The establishment is frequented by powerful politicians and wealthy doctors, making it a hotbed of both political machinations and hidden desires.
Is it art? Is it exploitation? The answer likely depends on whether you watch it on a 55-inch OLED screen or a grainy, 40-year-old VHS tape. The tape, with its physical wear and analog decay, somehow softens the horror, turning it into a dream—or a nightmare—from a lost era of Brazilian cinema.
In the shadowy corners of video store archives, buried under layers of dust and digital disregard, lies a piece of celluloid history that still sparks intense debate, revulsion, and academic curiosity. The file label reads simply: . To the uninitiated, it looks like a typo-laced relic. To the seasoned collector of rare Brazilian cinema, it is the Holy Grail—or the forbidden fruit.
In 1987, Xuxa filed a massive legal block against the film's commercial distribution The VHS Boom: Becoming an Underground Artifact
The following article discusses a film that is widely considered controversial due to its sensitive and taboo subject matter. It is presented here as a historical and cinematic review for informational purposes. Reader discretion is advised.
The Initialize procedure ended by calling the LabelCaptions procedure passing two arguments, namely the present month and year.
The LabelCaptions procedure does several things that determine the look of the calendar, and it is called every time the user changes month or year.
It checks stuff like the number of days in the month, where to put the first date according to the first day of the week, it finds the first day of the month and more. Here is how it looks:
Sub LabelCaptions(lMonth As Long, lYear As Long)
Dim lCount As Long
Dim lNumber As Long
Dim lMonthPrev As Long
Dim lDaysPrev As Long
Dim lYearPrev As Long
sMonth = MonthName(lMonth)
lSelMonth = lMonth
lSelYear = lYear
Select Case lMonth
Case 2 To 11
lMonthPrev = lMonth - 1
lYearPrev = lYear
Case 1
lMonthPrev = 12
lYearPrev = lYear - 1
Case 12
lMonthPrev = 11
lYearPrev = lYear
End Select
lDays = DaysInMonth(lMonth, lYear)
lDaysPrev = DaysInMonth(lMonthPrev, lYearPrev)
If lSelYear >= 1900 And lSelMonth > 1 Then
lblBack.Enabled = True
ElseIf lSelYear = 1900 And lSelMonth = 1 Then
lblBack.Enabled = False
End If
If bCmbSel = False Then
cmbMonth.Text = sMonth
cmbYear.Text = lYear
End If
lFirstDayInMonth = DateSerial(lSelYear, lSelMonth, 1)
lFirstDayInMonth = Weekday(lFirstDayInMonth, vbUseSystemDayOfWeek)
If lFirstDayInMonth = 1 Then
lStartPos = 8
Else
lStartPos = lFirstDayInMonth
End If
lNumber = lDaysPrev + 1
For lCount = lStartPos - 1 To 1 Step -1
lNumber = lNumber - 1
With colLabels.Item(lCount)
.Caption = lNumber
.ForeColor = &HE0E0E0
End With
Next
lNumber = 0
For lCount = lStartPos To lDays + lStartPos - 1
lNumber = lNumber + 1
With colLabels.Item(lCount)
.Caption = lNumber
.ForeColor = &H80000012
End With
Next
lNumber = 0
For lCount = lDays + lStartPos To 42
lNumber = lNumber + 1
With colLabels.Item(lCount)
.Caption = lNumber
.ForeColor = &HE0E0E0
End With
Next
End Sub
Below is the function that finds the number of days in the selected month. It is quite simple.
Function DaysInMonth(lMonth As Long, lYear As Long) As Long
Select Case lMonth
Case 1, 3, 5, 7, 8, 10, 12
DaysInMonth = 31
Case 2
If IsDate("29/2/" & lYear) = False Then
DaysInMonth = 28
Else
DaysInMonth = 29
End If
Case Else
DaysInMonth = 30
End Select
End Function
There are more procedures handling user actions like changing month or year using the month or year combo boxes. That is more or less trivial stuff, and you can see the code, if you download the workbook.
The most important thing left is the label event handling class.
The event handling class
In the userform's Initialize procedure we connected all the date labels to the class clLabelClass and put them in a collection, colLabelEvent.
The user picks a date by clicking a date label, and if you didn't have the class handling this event, you would have to write a click procedure for each end every label. Now all clicks are handled by the class module code below.
The code uses some Public variables like sActiveDay declared im Module1.
Option Explicit
Public WithEvents InputLabel As MSForms.Label
Private Sub InputLabel_click()
With InputLabel
If .Tag < lStartPos Then
If UserForm1.lblBack.Enabled = True Then
UserForm1.lblBack_Click
End If
Exit Sub
End If
If .Tag > lDays + lStartPos - 1 Then
UserForm1.lblForward_Click
Exit Sub
End If
If .BorderColor = vbBlue Then Exit Sub
.BorderColor = vbBlue
.BorderStyle = fmBorderStyleSingle
If Len(sActiveDay) > 0 Then
If sActiveDay <> InputLabel.Name Then
With colLabels.Item(sActiveDay)
.BorderColor = &H8000000E
.BorderStyle = fmBorderStyleNone
End With
End If
End If
sActiveDay = InputLabel.Name
lFirstDay = Val(InputLabel.Caption)
If bSecondDate = False Then
UserForm1.FillFirstDay
Else
UserForm1.FillSecondDay
End If
End With
End Sub
That was the most important parts of the calendar's code. To see the rest, download the workbook.
The selected date or dates will be in two labels on the user form, but internally they are stored in the variables datFirstDay and datLastDay (declared on module level in the userform).
A date or dates can be used in many ways, and you can put your own code in the OK button's click procedure.
As sample code I find the difference in days between the two dates and display it in a message box, before the form closes. You can just replace that with your own code.
By picking my birthday and the day I write this, I can see, that I have lived for 21979 days. Time sure flies ...
Related:
|