Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default runtime error 91 by passing a value between modules

Hello,

I want to set a Flag being passed from "ThisWorkbook" to "Table1" by
purpose. I use following code:

'## Thisworkbook
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Dim tPl As Table1

If Sh.Name = SHEETTP Then
tPl.tblChanged = True '<<<< here occurs the error
End If

End Sub

'## Table1:

Private m_tblChanged
Public Property Get tblChanged() As Boolean
tblChanged = m_tblChanged
End Property
Public Property Let tblChanged(ByVal setFlag As Boolean)
m_tblChanged = setFlag
End Property

private sub cmdDoSomething_click()
action
me.tblChanged=False
end sub

Any hint ?? thanx a lot!!

Christian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default runtime error 91 by passing a value between modules

What is Table1? The name of a module, a class name or what?

Maybe you want.

## Thisworkbook
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Dim tPl As Table1

Set tP1 = New Table1

If Sh.Name = SHEETTP Then
tPl.tblChanged = True '<<<< here occurs the error
End If

End Sub



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
oups.com...
Hello,

I want to set a Flag being passed from "ThisWorkbook" to "Table1" by
purpose. I use following code:

'## Thisworkbook
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Dim tPl As Table1

If Sh.Name = SHEETTP Then
tPl.tblChanged = True '<<<< here occurs the error
End If

End Sub

'## Table1:

Private m_tblChanged
Public Property Get tblChanged() As Boolean
tblChanged = m_tblChanged
End Property
Public Property Let tblChanged(ByVal setFlag As Boolean)
m_tblChanged = setFlag
End Property

private sub cmdDoSomething_click()
action
me.tblChanged=False
end sub

Any hint ?? thanx a lot!!

Christian



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default runtime error 91 by passing a value between modules

Hi Bob,

What is Table1? The name of a module, a class name or what?


Thats the name of the sheet to be monitored as displayed in VBA-
Project under Micro$oft Excel objects


Set tP1 = New Table1


runs into "incorrect use of New"

Any ideas left ?

BR
Christian

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default runtime error 91 by passing a value between modules

Yeah.

Change

Private m_tblChanged

to

Public m_tblChanged

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
ups.com...
Hi Bob,

What is Table1? The name of a module, a class name or what?


Thats the name of the sheet to be monitored as displayed in VBA-
Project under Micro$oft Excel objects


Set tP1 = New Table1


runs into "incorrect use of New"

Any ideas left ?

BR
Christian



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
xpath error? Runtime Error 13 type mismatch SteveM Excel Discussion (Misc queries) 1 December 4th 07 09:16 AM
Passing Controls on a form between modules Graham Y[_2_] Excel Programming 1 November 6th 06 12:50 PM
Passing Variables within For loops to other modules tomjermy Excel Programming 1 August 22nd 06 06:07 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


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

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"