ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SHOW Userform (https://www.excelbanter.com/excel-programming/381784-re-show-userform.html)

Tom Ogilvy

SHOW Userform
 
Just use code like the below to figure out where to write it




Dim rng as Range
set rng = cells(rows.count,1).End(xlup)(2)

rng.Value = Textbox1.Value
rng.offset(0,1).Value = Textbox2.Value

--
Regards,
Tom Ogilvy




"WLMPilot" wrote in message
...
As I am finding out, I believe the problem lies elsewhere in the code. I
am
been playing around with things, including your suggestion and it appears
that it not the root of the problem. Not sure what is yet, but hopefully
I
will find it out soon.

However, I do have another question:

How do you loop a userform? The ItemQty userform has two commandbuttons
(ENTER & FINISHED). The user enters an ITEM# and QTY then clicks ENTER if
there are still items to be ordered. I need to be able to select the
beginning cell, ie A13, then place the data in A13 (item#), B13 (qty),
then
advance to A14 and repeat for the next item until the user clicks
FINISHED.


"Tom Ogilvy" wrote:

Why not just use


itemqty.Show

and skip creating a new instance with a variable.

--
Regards,
Tom Ogilvy


"WLMPilot" wrote:

I have a working excel sheet that allows the following:

A) Userform "STINFO" allows user to input answers to two questions.
B) Click CONTINUE (on STINFO userform)
C) Executes Private Sub Worksheet_Change (ByVal Range as Target)
a) MSGBOXes, INPUTBOXes are used to obtain next set of data.
b) Last set of data is written to control the cursor movement L-R
on the worksheet for user to inter ITEM# and QTY.

The above works great!!! However, I am trying to switch the last part
(C-b) that is used for ITEM# & QTY to a userform named ItemQty.

What I did was to remove the code that executes the control of the
cursor
for ITEM# & QTY, created the userform to obtain the info, then inserted
the
following (in place of the code that was removed):

Dim iq as New itemqty
iq.Show
Exit Sub

The problem that is coming up is an error (424) and it highlights the
iq.show stating that an object is required.

I appreciate any help on this!

Thanks,
Les





All times are GMT +1. The time now is 11:04 PM.

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