LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Populating a dialogbox

I am using the code below to populate a dialogbox. I only want this to work
if there is a value in the selected cell. If there is a formula and not a
value then I want the Textboxes to be empty.


Private Sub UserForm_Initialize()
Dim rng
Set rng = Cells(ActiveCell.Row, 1)

TextBox1.Text = rng(1, 1).Value
TextBox2.Text = rng(1, 2).Value
TextBox3.Text = rng(1, 3).Value
TextBox4.Text = rng(1, 4).Value
End Sub


 
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
reactivate DialogBox oldLearner57 Excel Discussion (Misc queries) 1 September 15th 08 01:02 AM
Dialogbox Creation Scott Excel Discussion (Misc queries) 0 May 6th 06 09:52 PM
OpenFile dialogbox Manu Palao Excel Worksheet Functions 1 November 24th 04 04:27 PM
VB6 COM Add-In and Modeless Dialogbox BOELENS Didier Excel Programming 0 November 16th 04 10:35 AM
DialogBox Greg[_12_] Excel Programming 2 September 17th 03 01:41 AM


All times are GMT +1. The time now is 06:53 AM.

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

About Us

"It's about Microsoft Excel"