I have a workbook with two worksheets: accruals and Dec08_payments. I am positioned on the accruals worksheet and trying to execute the code below to put a value on the Dec_payments worksheet, which needs to be a variable. The value is put on the accruals worksheet not on Dec08_payments.
What am I doing wrong?
[VBA]Option Explicit
Sub MatchToMonth()
'
Dim Sheetname As String
Sheetname = InputBox("Enter tab name of month to compare.")
MsgBox "tab month to be compared is " & Sheetname
Sheets(Sheetname).Select
ActiveSheet.Name = Sheetname
Cells(1, 20).Value = "Post W/H tax Accrual (CCY)"
End Sub[/VBA]