PC Review


Reply
Thread Tools Rate Thread

Can I have 2 user forms that relate to the same worksheet

 
 
ButterflyGirl
Guest
Posts: n/a
 
      16th Jun 2009
Hi & thanks in advance,
I am trying to put 2 user forms that relate to the same worksheet, however
its not working...
I am getting an error message that says "Compile error: Invalid or
unqualified reference"
I am extremely new to programming so i would appreciate any help I can
get... I can email the "code" through if that helps.
--
Thanks,
Butterfly Girl
 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      16th Jun 2009
hi
why not just post your code here. everyone does it.

regards
FSt1

"ButterflyGirl" wrote:

> Hi & thanks in advance,
> I am trying to put 2 user forms that relate to the same worksheet, however
> its not working...
> I am getting an error message that says "Compile error: Invalid or
> unqualified reference"
> I am extremely new to programming so i would appreciate any help I can
> get... I can email the "code" through if that helps.
> --
> Thanks,
> Butterfly Girl

 
Reply With Quote
 
ButterflyGirl
Guest
Posts: n/a
 
      16th Jun 2009
After 2 days of searching I actually found the answer myself!!! :-)
I left the _ (underscore) off the end of the 1st row & obviously this makes
a difference as to how the code is handled. Please explain why? But it is
now working perfectly.


lRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row

--
Thanks,
Butterfly Girl


"FSt1" wrote:

> hi
> why not just post your code here. everyone does it.
>
> regards
> FSt1
>
> "ButterflyGirl" wrote:
>
> > Hi & thanks in advance,
> > I am trying to put 2 user forms that relate to the same worksheet, however
> > its not working...
> > I am getting an error message that says "Compile error: Invalid or
> > unqualified reference"
> > I am extremely new to programming so i would appreciate any help I can
> > get... I can email the "code" through if that helps.
> > --
> > Thanks,
> > Butterfly Girl

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      16th Jun 2009
It is actually a single line of code.

lRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row

_ is used as a line break; incase your code line is lenghty you can use a
space and underscore to break that to multiple lines.....

If this post helps click Yes
---------------
Jacob Skaria


"ButterflyGirl" wrote:

> After 2 days of searching I actually found the answer myself!!! :-)
> I left the _ (underscore) off the end of the 1st row & obviously this makes
> a difference as to how the code is handled. Please explain why? But it is
> now working perfectly.
>
>
> lRow = ws.Cells(Rows.Count, 1) _
> .End(xlUp).Offset(1, 0).Row
>
> --
> Thanks,
> Butterfly Girl
>
>
> "FSt1" wrote:
>
> > hi
> > why not just post your code here. everyone does it.
> >
> > regards
> > FSt1
> >
> > "ButterflyGirl" wrote:
> >
> > > Hi & thanks in advance,
> > > I am trying to put 2 user forms that relate to the same worksheet, however
> > > its not working...
> > > I am getting an error message that says "Compile error: Invalid or
> > > unqualified reference"
> > > I am extremely new to programming so i would appreciate any help I can
> > > get... I can email the "code" through if that helps.
> > > --
> > > Thanks,
> > > Butterfly Girl

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How/when do forms & subforms relate? Eric Johnson Microsoft Access Forms 1 24th Feb 2006 07:25 PM
Relate from one worksheet to another Microsoft Excel Worksheet Functions 2 9th Jan 2005 01:00 PM
User forms & worksheet help! mebner Microsoft Excel Programming 6 11th Feb 2004 02:26 AM
simple question about how asp forms relate to asp.net data grids etc. steve w Microsoft Dot NET 0 9th Dec 2003 09:51 PM
Worksheet value to user forms David Microsoft Excel Programming 2 28th Oct 2003 11:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:15 PM.