I am so stupid, the code i used form the example you shared me earlier had a WIth statement, I am looking at it and I tried the below code it works !!
With bot
.SwitchToFrame .FindElementByTag("frame")
.FindElementByName("input-username").SendKeys "User"
End With