Works fine with: [seems there is no need of Public declarations for bringing a variable from userform to Sub, right?]:
Sub (No Public declarations)
Sub Split_Riga()
UserForm1.Show
Cells(RSplit, 3) = FSplit
End Sub
Userform
Private Sub CommandButton1_Click()
FSplit = UserForm1.TextBox1.Value
UserForm1.Hide
End Sub
Works fine with:
Sub
Public a As Double
Sub Split_Riga()
UserForm1.Show
FSplit = a
Cells(RSplit, 3) = FSplit
End Sub
Userform
Private Sub CommandButton1_Click()
a = UserForm1.TextBox1.Value
UserForm1.Hide
End Sub
Not working with (equal to previous exchanging a with FSplit): [Error - Found non univocal name: FSplit]
Sub
Public FSplit As Double
Sub Split_Riga()
UserForm1.Show
Cells(RSplit, 3) = FSplit
End Sub
Userform
Private Sub CommandButton1_Click()
FSplit = UserForm1.TextBox1.Value
UserForm1.Hide
End Sub
[Could you tell me the differences between the three methods?]
Thanks!
Bookmarks