I am basically trying to do the following:
Copy a value from H13 on one worksheet (User Interface) and paste the value on another worksheet (Customer) in cell "Ox", the O is column (letter) O and x is the index value I am grabbing from cell U1.
Reason I am trying this is to allow for the row number to change according to the value they select on another sheet.
I have been getting Error 400
Any suggestions?
I have tried the following.
Sub UpdateValues()
Dim offs As Byte
offs = Range("Customers!U1").Value
Range("H13").Select
Set MyRange = Selection
MyRange.Copy
Sheets("Customers").Activate
Application.Goto ActiveWorkbook.Sheets("Customers").Cells(1, 15).Offset(offs, 0)
End Sub
OR
Sub UpdateValues()
Dim ColVar As Integer
ColVar = Cells(1, 21).Value
Range("H13").Select
Set MyRange = Selection
MyRange.Copy
Sheets("Customers").Activate
Application.Goto ActiveWorkbook.Sheets("Customers").Cells(ColVar, 15)
End Sub
Sheets("User Interface").Activate
If Range("AA6").Text = "TRUE" Then
Range("H13").Select
Selection.Copy
Sheets("Customers").Activate
Range("Customers!O1").Offset(Range("'user interface'!u1").Value - 1).Paste
Else
Range("E19").Select
End If
End Sub
Bookmarks