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: 92
Default Create a public variable

Below is my UserForm_Initialize code. What I'm wondering is, is it possible
to declare a Public Variable if rng(1, 7).value is "Yes"?

I would call the Variable Cleared and then during my exit routine
(clicking the Finished Button) I would need a statement that said if Cleared
is true then exit sub.



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

TextBox1.Value = rng(1, 1) 'Date
TextBox1.Text = Format(TextBox1.Text, "mm/dd/yyyy")
TextBox2.Value = rng(1, 2) 'Check Number
TextBox3.Value = rng(1, 3) 'Check Amount
TextBox3.Value = Format(TextBox3.Value, "currency")
TextBox4.Value = rng(1, 4) 'Paid To
TextBox5.Value = rng(1, 5) 'Explination

If rng(1, 7).Value = "Yes" Then
OptionButton1.Value = True
End If

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
Public variable (or Public Const?) Brettjg Excel Programming 14 April 23rd 09 11:30 PM
Public variable (or Public Const?) Tim Williams[_2_] Excel Programming 0 April 23rd 09 06:33 AM
Public variable Eric[_35_] Excel Programming 7 March 18th 07 06:54 AM
Public Variable Jason Excel Programming 4 April 12th 04 07:06 PM
public variable marwan hefnawy Excel Programming 1 September 5th 03 08:54 AM


All times are GMT +1. The time now is 06:24 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"