I have just downloaded MS365 (Office) to a second laptop (Windows 10 as 11 cannot be supported) under my MS account and accessed a file from the OneDrive.
This file contains a VBA coded User Form which works fine on my Surface Pro 7 (Windows 11). However, I am experiencing some VBA code issues when I try to input information into the User Form.
I have checked the Excel options and Advanced Settings and these are the same on both devices. I fully expect more problems late in the code but initially the problem arises when I key in the first field of information.
Text Box txtWeight - The code formats the keyed information and there is an AutoTab property to the next TextBox (txtBPSystolic).
As soon as I key information into the txtWeight textbox the developeer code appears and the word Format appears highlighted indicating an error in the code in Me.txtWeight = Format(Me.txtWeight, "#,##0.0").
When I select END from the message box the same happens for the next sub.
This suggest that perhaps "Format" is no longer supported in the latest downloadable version of MS365.
In addition, once I have selected to exit and accept that the debugger will stop the process, I cannot get the file or Excel to close. I have close Excel through Task Manager.
Hoping that this might be a simple issue and not that MS have made changes to VBA.
Thanks in advance
This file contains a VBA coded User Form which works fine on my Surface Pro 7 (Windows 11). However, I am experiencing some VBA code issues when I try to input information into the User Form.
I have checked the Excel options and Advanced Settings and these are the same on both devices. I fully expect more problems late in the code but initially the problem arises when I key in the first field of information.
Text Box txtWeight - The code formats the keyed information and there is an AutoTab property to the next TextBox (txtBPSystolic).
As soon as I key information into the txtWeight textbox the developeer code appears and the word Format appears highlighted indicating an error in the code in Me.txtWeight = Format(Me.txtWeight, "#,##0.0").
When I select END from the message box the same happens for the next sub.
This suggest that perhaps "Format" is no longer supported in the latest downloadable version of MS365.
VBA Code:
Dim Currentrow As Long
Dim wsDailyStatistics As Worksheet
Private Sub FullDetails_Click()
End Sub
Private Sub UserForm_Initialize()
txtDate = ""
txtDayNumber = ""
txtWeight = ""
txtBPSystolic = ""
txtBPDiastolic = ""
txtPulse = ""
txtBloodOxygen = ""
txtMorning = ""
txtMidday = ""
txtEvening = ""
txtWeight.SetFocus
Set wsDailyStatistics = ThisWorkbook.Worksheets("Daily Statistics")
cmdUpdate.Enabled = False
End Sub
Private Sub txtWeight_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.txtWeight = Format(Me.txtWeight, "#,##0.0")
End Sub
Private Sub txtBPSystolic_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.txtBPSystolic = Format(Me.txtBPSystolic, "#,##0")
End Sub
Private Sub txtBPDiastolic_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Me.txtBPDiastolic = Format(Me.txtBPDiastolic, "#,##0")
End Sub
In addition, once I have selected to exit and accept that the debugger will stop the process, I cannot get the file or Excel to close. I have close Excel through Task Manager.
Hoping that this might be a simple issue and not that MS have made changes to VBA.
Thanks in advance