Hello All
I've developed an application in Excel 2010 32bit.
It has 20+ spreadsheets containing data and equations, and I've created userforms to enter the data for those spreadsheets. These userforms consist primarily of text boxes. You enter the data in the text box and then click a command button that calls a Sub Routine which transfers that data to the spreadsheets. I use a For/Next loop to transfer the data to the spreadsheets. I also use a For/Next loop to return some of the results from the spreadsheets back onto the userform.
My problem now is that it runs perfectly on Excel 2010 32bit, the userforms activate and unload with no errors. But it crashes when I try activating the userforms in Excel 2013 64bit. Is this normal? I have no idea what I am doing wrong.
I've included an example of the code that I use in the userforms. When the userform activates, the code displays the results in the spreadsheet in 42 textboxes. The results are in a vertical table, hence the loop function. The code to transfer the data to the spreadsheet, follows the same structure.
Thanks
I've developed an application in Excel 2010 32bit.
It has 20+ spreadsheets containing data and equations, and I've created userforms to enter the data for those spreadsheets. These userforms consist primarily of text boxes. You enter the data in the text box and then click a command button that calls a Sub Routine which transfers that data to the spreadsheets. I use a For/Next loop to transfer the data to the spreadsheets. I also use a For/Next loop to return some of the results from the spreadsheets back onto the userform.
My problem now is that it runs perfectly on Excel 2010 32bit, the userforms activate and unload with no errors. But it crashes when I try activating the userforms in Excel 2013 64bit. Is this normal? I have no idea what I am doing wrong.
I've included an example of the code that I use in the userforms. When the userform activates, the code displays the results in the spreadsheet in 42 textboxes. The results are in a vertical table, hence the loop function. The code to transfer the data to the spreadsheet, follows the same structure.
Code:
Option Explicit
Dim WS as worksheet
Dim ID As Integer
Dim RowStart, ColumnStart As Integer
Private Sub UserForm_Initialize()
Set WS = Thisworkbook.Sheets("Data1")
End Sub
Private Sub UserForm_Activate()
Call LoadResults
End Sub
Private Sub LoadResults()
RowStart= WSCharInput.Range("InputRow").Row
ColStart= WSCharInput.Range("InputRow").Column
If lbl_ProjectName.Caption = "No Project" Then
For ID = 0 To 41
Me.Controls("TextBox" & ID).Value = vbNullString
Next
Exit Sub
End If
For ID = 0 To 41
Me.Controls("TextBox" & ID).Value = WS.Cells(RowStart + ID, ColStart).Text
Next
End Sub
Thanks