cozzagiorgi
New Member
- Joined
- Jun 27, 2018
- Messages
- 41
Hi
I want to stock my range (lets say A6:A13) in to a variable. But the size of this range can change according to what the user puts in.
Later on I will take this variable, transpose it and paste it in the range A1:Z40
The code I have is:
Of course, the range A17:Z17 is much bigger than what I would need so it gives me #NV errors. How can i do that without those errors? I am sure there is a better solution for what I am doing...
I want to stock my range (lets say A6:A13) in to a variable. But the size of this range can change according to what the user puts in.
Later on I will take this variable, transpose it and paste it in the range A1:Z40
The code I have is:
Code:
Sub AuswahlErstellt()
Dim Proben() As Variant
varProben = Range("A6:A13").Value
Range("A17:Z17") = Application.WorksheetFunction.Transpose(varProben)
End Sub
Of course, the range A17:Z17 is much bigger than what I would need so it gives me #NV errors. How can i do that without those errors? I am sure there is a better solution for what I am doing...