Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Public, Private, Event modules, Forms modules,,,

Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq" while in an
Event module, say sheet1 and I need to "use it" immediately in Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Public, Private, Event modules, Forms modules,,,

assume it is typed/declared at the top of the sheet1 (code name) module
outside any procedures

Public MySeq

then in the userform.

v = Sheet1!MySeq

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:qzc9f.35503$OM4.8753@dukeread06...
Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq" while in an
Event module, say sheet1 and I need to "use it" immediately in Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Public, Private, Event modules, Forms modules,,,

I think I did as you said, but now I'm getting
R/T 438 - Obj doesn't support this prop or meth..

After clicking Debug I'm taken to my user module code
window with highlite covering:
CurrRowNo = Sheet2!MySeq

Any thoughts on what I might try to fix?
TIA,
Jim

"Tom Ogilvy" wrote in message
...
assume it is typed/declared at the top of the sheet1 (code name) module
outside any procedures

Public MySeq

then in the userform.

v = Sheet1!MySeq

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:qzc9f.35503$OM4.8753@dukeread06...
Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq" while in an
Event module, say sheet1 and I need to "use it" immediately in Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Public, Private, Event modules, Forms modules,,,

Tom's post had a typo: an exclamation mark where there should
have been a period.

Use
CurrRowNo = Sheet2.MySeq


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jim May" wrote in message
news:sae9f.35513$OM4.33041@dukeread06...
I think I did as you said, but now I'm getting
R/T 438 - Obj doesn't support this prop or meth..

After clicking Debug I'm taken to my user module code
window with highlite covering:
CurrRowNo = Sheet2!MySeq

Any thoughts on what I might try to fix?
TIA,
Jim

"Tom Ogilvy" wrote in message
...
assume it is typed/declared at the top of the sheet1 (code
name) module
outside any procedures

Public MySeq

then in the userform.

v = Sheet1!MySeq

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:qzc9f.35503$OM4.8753@dukeread06...
Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq"
while in an
Event module, say sheet1 and I need to "use it" immediately
in Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Public, Private, Event modules, Forms modules,,,

Yes, thanks, that got me PAST that Line, however I'm
now stopped at the next line with R/T 1004 App...
Holding the cursor over Sheet2.MySeq reads "EMPTY",
probably why it is bombing..
hummmm..
Appreciate your help.
Jim

"Chip Pearson" wrote in message
...
Tom's post had a typo: an exclamation mark where there should have been a
period.

Use
CurrRowNo = Sheet2.MySeq


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jim May" wrote in message
news:sae9f.35513$OM4.33041@dukeread06...
I think I did as you said, but now I'm getting
R/T 438 - Obj doesn't support this prop or meth..

After clicking Debug I'm taken to my user module code
window with highlite covering:
CurrRowNo = Sheet2!MySeq

Any thoughts on what I might try to fix?
TIA,
Jim

"Tom Ogilvy" wrote in message
...
assume it is typed/declared at the top of the sheet1 (code name) module
outside any procedures

Public MySeq

then in the userform.

v = Sheet1!MySeq

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:qzc9f.35503$OM4.8753@dukeread06...
Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq" while in
an
Event module, say sheet1 and I need to "use it" immediately in Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Public, Private, Event modules, Forms modules,,,

MySeq is created in a Before Double-Click Event
which after performing certain code ends with
Cancel = True;
Does that matter?
Jim

"Jim May" wrote in message
news:kte9f.35525$OM4.16202@dukeread06...
Yes, thanks, that got me PAST that Line, however I'm
now stopped at the next line with R/T 1004 App...
Holding the cursor over Sheet2.MySeq reads "EMPTY",
probably why it is bombing..
hummmm..
Appreciate your help.
Jim

"Chip Pearson" wrote in message
...
Tom's post had a typo: an exclamation mark where there should have been a
period.

Use
CurrRowNo = Sheet2.MySeq


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jim May" wrote in message
news:sae9f.35513$OM4.33041@dukeread06...
I think I did as you said, but now I'm getting
R/T 438 - Obj doesn't support this prop or meth..

After clicking Debug I'm taken to my user module code
window with highlite covering:
CurrRowNo = Sheet2!MySeq

Any thoughts on what I might try to fix?
TIA,
Jim

"Tom Ogilvy" wrote in message
...
assume it is typed/declared at the top of the sheet1 (code name) module
outside any procedures

Public MySeq

then in the userform.

v = Sheet1!MySeq

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:qzc9f.35503$OM4.8753@dukeread06...
Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq" while in
an
Event module, say sheet1 and I need to "use it" immediately in Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA












  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Public, Private, Event modules, Forms modules,,,

v = Sheet1!MySeq

Should be Sheet1.MySeq


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Tom Ogilvy" wrote in message
...
assume it is typed/declared at the top of the sheet1 (code
name) module
outside any procedures

Public MySeq

then in the userform.

v = Sheet1!MySeq

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:qzc9f.35503$OM4.8753@dukeread06...
Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq"
while in an
Event module, say sheet1 and I need to "use it" immediately in
Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Public, Private, Event modules, Forms modules,,,

Mental gliche

Thanks,

Regards,
Tom Ogilvy

"Chip Pearson" wrote in message
...
v = Sheet1!MySeq


Should be Sheet1.MySeq


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Tom Ogilvy" wrote in message
...
assume it is typed/declared at the top of the sheet1 (code
name) module
outside any procedures

Public MySeq

then in the userform.

v = Sheet1!MySeq

--
Regards,
Tom Ogilvy

"Jim May" wrote in message
news:qzc9f.35503$OM4.8753@dukeread06...
Theis is probably simple, but not to me (at this point)...

If I assign a value (an integer, say 5) to a variable "mySeq"
while in an
Event module, say sheet1 and I need to "use it" immediately in
Command
button Click event
of a Form frmPOReqEdit, how would I do that?
TIA








Reply
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
Basic question - modules and class modules - what's the difference? Mark Stephens[_3_] Excel Programming 9 May 8th 05 11:48 AM
When to code in sheet or userform modules and when to use modules Tony James Excel Programming 1 December 16th 04 10:02 PM
Forms and Modules scrabtree23[_2_] Excel Programming 4 November 11th 03 03:57 PM
Modules and Forms II Pedro Excel Programming 1 November 7th 03 11:19 AM
Modules and Forms Pedro Excel Programming 2 November 6th 03 02:02 PM


All times are GMT +1. The time now is 08:23 AM.

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

About Us

"It's about Microsoft Excel"