Format Textbox value

redspanna

Well-known Member
Joined
Jul 27, 2005
Messages
1,462
Office Version
  1. 2016
Platform
  1. Windows
Hi all

I have this code that places the 'Value' of the TEXTBOX into a specific cell,
I want the value to be pasted as TEXT, how can this code be changed

Code:
Sheets("Heavy").Range("F1") = TextBox1.Value

thanks
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

Code:
With Sheets("Heavy").Range("F1")
    .Value = TextBox1.Value
    .NumberFormat = "@"
End With
 

Watch MrExcel Video

Forum statistics

Threads
1,108,991
Messages
5,526,099
Members
409,685
Latest member
Bellybb

This Week's Hot Topics

Top