I have a worksheet consisting of several tabs. The first tab contains a table that is filled out manually. The content of the columns is auto pasted with paste link to tables on the other tabs.
Now I have found the following vba code on internet:
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
Dim actCol, curCol
actCol = Target.Column
If actCol > 52 Then
curCol = Chr(Int((actCol - 1) / 52) + 64) & _
Chr(Int((actCol - 27) / 26) + 64) & _
Chr(Int((actCol - 27) Mod 26) + 65)
ElseIf actCol > 26 Then
curCol = Chr(Int((actCol - 1) / 26) + 64) & _
Chr(Int((actCol - 1) Mod 26) + 65)
Else
curCol = Chr(actCol + 64)
End If
Columns(curCol & ":" & curCol).AutoFit
End Sub
This code sequence autofits text in all tabs but not in the pasted links.
Do I need more code or some other command to autofit the pasted links?
Bookmarks