ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Quick English to VBA (https://www.excelbanter.com/excel-discussion-misc-queries/79870-quick-english-vba.html)

Trintrin

Quick English to VBA
 

Please help me translate this code
to VBA!

if textbox1 = nothing (as in no information) Then do not write anything
or erase anything

if textbox1 = anything THEN write anything in given cell
ie. -ws.Cells(iRow, 1).Value = Me.textbox1.Value-


--
Trintrin
------------------------------------------------------------------------
Trintrin's Profile: http://www.excelforum.com/member.php...o&userid=32681
View this thread: http://www.excelforum.com/showthread...hreadid=526824


Chip Pearson

Quick English to VBA
 
Try something like

If Me.TextBox1.Text < "" Then
ws.Cells(iRow,1).Value = Me.TextBox1.Text
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Trintrin"
wrote in
message
...

Please help me translate this code
to VBA!

if textbox1 = nothing (as in no information) Then do not write
anything
or erase anything

if textbox1 = anything THEN write anything in given cell
ie. -ws.Cells(iRow, 1).Value = Me.textbox1.Value-


--
Trintrin
------------------------------------------------------------------------
Trintrin's Profile:
http://www.excelforum.com/member.php...o&userid=32681
View this thread:
http://www.excelforum.com/showthread...hreadid=526824




Trintrin

Quick English to VBA
 

oh ok, now I get it.

Sorry i had to ask you twice. Thanks a lot!!!!


--
Trintrin
------------------------------------------------------------------------
Trintrin's Profile: http://www.excelforum.com/member.php...o&userid=32681
View this thread: http://www.excelforum.com/showthread...hreadid=526824



All times are GMT +1. The time now is 08:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com