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: 343
Default Run code from within a UserForm

What I have is a DialogBox (called DataInput) with a large number of
TextBoxes and when I exit each one of the text boxes I wanted to run the
code below. So in an effort to reduce the number of lines of code, I had
hoped I could have just entered one line:

Module2.DisplayPay

But I get an object required error.


Sub DisplayPay()

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

TextBox611.Value = rng(1, 99)
TextBox612.Value = rng(1, 104)
TextBox613.Value = rng(1, 109)
TextBox614.Value = rng(1, 114)
TextBox615.Value = rng(1, 119)

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
How to get variables from worksheet code to userform code Donny Excel Programming 6 August 23rd 08 01:31 AM
userform and VBA code [email protected] Excel Programming 6 July 11th 07 10:54 PM
code help w/userform Jennifer Excel Programming 2 May 26th 06 03:47 AM
Help with UserForm Code sneagle Excel Programming 1 November 18th 05 06:41 PM
Userform Code scrabtree23[_3_] Excel Programming 3 December 5th 04 05:05 AM


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