Kashmira Posted January 3, 2021 Share Posted January 3, 2021 Hi I could do the assignment for this tutorial. Converting celsius to Fahrenheit. I tried to add With Range and it gives me error, object require. Pls advise where my code is wrong. Sub celcius() Dim celcius As Integer Dim Farenhiet As Integer celcius = InputBox("Give me temperature in Celcius") Range("B3").Value = celcius Farenhiet = (celcius * 1.8) + 32 With Range("B4").Value = Farenhiet .Font.Size = 11 .Font.Color = "2367" MsgBox "Farenhiet is" & " " & Farenhiet End With End Sub Without using "With" it works. Do I need to use the Worksheets object. ? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.