Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Edit cell contents via userform listbox


Many thanks for the code Dave

Yep sometimes I need to clear the cell! I have saved your code as i
will, no doubt, be usefull another time!

I am opting to put a messagebox in front of your other piece of code.
If I forewarn the user this should be enough protection!!! Anyway
they are the ones who have to type it back in <g

Regards

Kenn

--
N E Bod
-----------------------------------------------------------------------
N E Body's Profile: http://www.excelforum.com/member.php...fo&userid=1126
View this thread: http://www.excelforum.com/showthread.php?threadid=27006

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Edit cell contents via userform listbox

Maybe adjusting the first version:

Private Sub CommandButton2_Click()
If myCell Is Nothing Then
'do nothing
Else
myCell.Value = Me.TextBox1.Value
Me.TextBox1.Value = ""
Me.ListBox1.List = myRng.Value
End If
End Sub

to

Private Sub CommandButton2_Click()
If myCell Is Nothing Then
'do nothing
Else
myCell.Value = Me.TextBox1.Value
Me.TextBox1.Value = ""
Me.ListBox1.List = myRng.Value
'break it for the next click!
set mycell = nothing
End If
End Sub

N E Body wrote:

Many thanks for the code Dave

Yep sometimes I need to clear the cell! I have saved your code as it
will, no doubt, be usefull another time!

I am opting to put a messagebox in front of your other piece of code.
If I forewarn the user this should be enough protection!!! Anyway,
they are the ones who have to type it back in <g

Regards

Kenny

--
N E Body
------------------------------------------------------------------------
N E Body's Profile: http://www.excelforum.com/member.php...o&userid=11263
View this thread: http://www.excelforum.com/showthread...hreadid=270067


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I edit cell contents with a macro in Excel? Mind the gaps! Excel Discussion (Misc queries) 2 March 23rd 05 08:51 PM
How can I edit cell contents with a macro in Excel? NotAnExpert Excel Discussion (Misc queries) 1 March 23rd 05 01:17 AM
Edit cell contents via userform listbox N E Body[_13_] Excel Programming 1 October 21st 04 01:13 AM
Edit cell contents via userform listbox N E Body[_12_] Excel Programming 1 October 20th 04 01:49 AM
Edit cell contents via userform listbox N E Body[_11_] Excel Programming 1 October 19th 04 03:16 AM


All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"