Only friend classes can access function pointer declared in CWinApp?

I've declared a function pointer in the CWinApp derived class:

class CTestDLLFunctionsApp : public CWinApp
{

	friend class CTestDLLFunctionsView;

public:

       << some code here >>

	typedef double (*tpfFatorial)(double);
	tpfFatorial fatorial;
};

extern CTestDLLFunctionsApp theApp;

And tryied to call this method in a CFormView derived class:

void CTestDLLFunctionsView::OnBnClickedCalcFat()
{
	// TODO: Add your control notification handler code here
	double nNumber;
	double CalcFat;

	nNumber = GetDlgItemInt(IDED_NUMBER);
	CalcFat = theApp.fatorial(nNumber);

	CString csResult;
	csResult.Format("Fatorial of %.0f = %.0f", nNumero, CalcFat);
	SetDlgItemText(IDED_RESULT, csResult);
}

If I declare CTestDLLFunctionsView (CFormView derived) as friend of
CTestDLLFunctionsApp (CWinApp derived), everything compile fine. If I
don't, I get the following error:

....\testDLLFunctionsView.cpp(88): error C2248:
'CtestDLLFunctionsApp::fatorial' : cannot access protected member
declared in class 'CTestDLLFunctionsApp'

Any hints? Thanks in advance!

0
vcinquini (12)
10/31/2006 7:43:01 PM
vc.mfc 33608 articles. 0 followers. Follow

9 Replies
758 Views

Similar Articles

[PageSpeed] 30

seems like <<some code here>> has got the protected identifier. Try putting 
public: just before the fptr definition of yours ......
<vcinquini@gmail.com> wrote in message 
news:1162323781.639008.108460@k70g2000cwa.googlegroups.com...
> I've declared a function pointer in the CWinApp derived class:
>
> class CTestDLLFunctionsApp : public CWinApp
> {
>
> friend class CTestDLLFunctionsView;
>
> public:
>
>       << some code here >>
>
> typedef double (*tpfFatorial)(double);
> tpfFatorial fatorial;
> };
>
> extern CTestDLLFunctionsApp theApp;
>
> And tryied to call this method in a CFormView derived class:
>
> void CTestDLLFunctionsView::OnBnClickedCalcFat()
> {
> // TODO: Add your control notification handler code here
> double nNumber;
> double CalcFat;
>
> nNumber = GetDlgItemInt(IDED_NUMBER);
> CalcFat = theApp.fatorial(nNumber);
>
> CString csResult;
> csResult.Format("Fatorial of %.0f = %.0f", nNumero, CalcFat);
> SetDlgItemText(IDED_RESULT, csResult);
> }
>
> If I declare CTestDLLFunctionsView (CFormView derived) as friend of
> CTestDLLFunctionsApp (CWinApp derived), everything compile fine. If I
> don't, I get the following error:
>
> ...\testDLLFunctionsView.cpp(88): error C2248:
> 'CtestDLLFunctionsApp::fatorial' : cannot access protected member
> declared in class 'CTestDLLFunctionsApp'
>
> Any hints? Thanks in advance!
> 


0
mubi (158)
11/1/2006 9:14:27 AM
It is public. Following the complete code of CTestDLLFunctionsApp:

class CTestDLLFunctionsApp : public CWinApp
{

	friend class CtestaDLLFuncoesView;

public:
	CTestDLLFunctionsApp();
	virtual BOOL InitInstance();
	afx_msg void OnAppAbout();
	DECLARE_MESSAGE_MAP()
	virtual int ExitInstance();

	HMODULE m_hDll;

	typedef double (*tpfFatorial)(double);
	tpfFatorial fatorial;
};

extern CTestDLLFunctionsApp theApp;



Mubashir Khan wrote:
> seems like <<some code here>> has got the protected identifier. Try putting
> public: just before the fptr definition of yours ......
> <vcinquini@gmail.com> wrote in message
> news:1162323781.639008.108460@k70g2000cwa.googlegroups.com...
> > I've declared a function pointer in the CWinApp derived class:
> >
> > class CTestDLLFunctionsApp : public CWinApp
> > {
> >
> > friend class CTestDLLFunctionsView;
> >
> > public:
> >
> >       << some code here >>
> >
> > typedef double (*tpfFatorial)(double);
> > tpfFatorial fatorial;
> > };
> >
> > extern CTestDLLFunctionsApp theApp;
> >
> > And tryied to call this method in a CFormView derived class:
> >
> > void CTestDLLFunctionsView::OnBnClickedCalcFat()
> > {
> > // TODO: Add your control notification handler code here
> > double nNumber;
> > double CalcFat;
> >
> > nNumber = GetDlgItemInt(IDED_NUMBER);
> > CalcFat = theApp.fatorial(nNumber);
> >
> > CString csResult;
> > csResult.Format("Fatorial of %.0f = %.0f", nNumero, CalcFat);
> > SetDlgItemText(IDED_RESULT, csResult);
> > }
> >
> > If I declare CTestDLLFunctionsView (CFormView derived) as friend of
> > CTestDLLFunctionsApp (CWinApp derived), everything compile fine. If I
> > don't, I get the following error:
> >
> > ...\testDLLFunctionsView.cpp(88): error C2248:
> > 'CtestDLLFunctionsApp::fatorial' : cannot access protected member
> > declared in class 'CTestDLLFunctionsApp'
> >
> > Any hints? Thanks in advance!
> >

0
vcinquini (12)
11/1/2006 12:27:18 PM
From AFXWIN.H:

#ifdef _AFXDLL
#define DECLARE_MESSAGE_MAP() \
private: \
 static const AFX_MSGMAP_ENTRY _messageEntries[]; \
protected: \
 static AFX_DATA const AFX_MSGMAP messageMap; \
 static const AFX_MSGMAP* PASCAL _GetBaseMessageMap(); \
 virtual const AFX_MSGMAP* GetMessageMap() const; \

#else
#define DECLARE_MESSAGE_MAP() \
private: \
 static const AFX_MSGMAP_ENTRY _messageEntries[]; \
protected: \
 static AFX_DATA const AFX_MSGMAP messageMap; \
 virtual const AFX_MSGMAP* GetMessageMap() const; \

#endif

Looks like it's declared protected.

Drew

<vcinquini@gmail.com> wrote in message 
news:1162384038.187946.320030@k70g2000cwa.googlegroups.com...
> It is public. Following the complete code of CTestDLLFunctionsApp:
>
> class CTestDLLFunctionsApp : public CWinApp
> {
>
> friend class CtestaDLLFuncoesView;
>
> public:
> CTestDLLFunctionsApp();
> virtual BOOL InitInstance();
> afx_msg void OnAppAbout();
> DECLARE_MESSAGE_MAP()
> virtual int ExitInstance();
>
> HMODULE m_hDll;
>
> typedef double (*tpfFatorial)(double);
> tpfFatorial fatorial;
> };
>
> extern CTestDLLFunctionsApp theApp;
>
>
>
> Mubashir Khan wrote:
>> seems like <<some code here>> has got the protected identifier. Try 
>> putting
>> public: just before the fptr definition of yours ......
>> <vcinquini@gmail.com> wrote in message
>> news:1162323781.639008.108460@k70g2000cwa.googlegroups.com...
>> > I've declared a function pointer in the CWinApp derived class:
>> >
>> > class CTestDLLFunctionsApp : public CWinApp
>> > {
>> >
>> > friend class CTestDLLFunctionsView;
>> >
>> > public:
>> >
>> >       << some code here >>
>> >
>> > typedef double (*tpfFatorial)(double);
>> > tpfFatorial fatorial;
>> > };
>> >
>> > extern CTestDLLFunctionsApp theApp;
>> >
>> > And tryied to call this method in a CFormView derived class:
>> >
>> > void CTestDLLFunctionsView::OnBnClickedCalcFat()
>> > {
>> > // TODO: Add your control notification handler code here
>> > double nNumber;
>> > double CalcFat;
>> >
>> > nNumber = GetDlgItemInt(IDED_NUMBER);
>> > CalcFat = theApp.fatorial(nNumber);
>> >
>> > CString csResult;
>> > csResult.Format("Fatorial of %.0f = %.0f", nNumero, CalcFat);
>> > SetDlgItemText(IDED_RESULT, csResult);
>> > }
>> >
>> > If I declare CTestDLLFunctionsView (CFormView derived) as friend of
>> > CTestDLLFunctionsApp (CWinApp derived), everything compile fine. If I
>> > don't, I get the following error:
>> >
>> > ...\testDLLFunctionsView.cpp(88): error C2248:
>> > 'CtestDLLFunctionsApp::fatorial' : cannot access protected member
>> > declared in class 'CTestDLLFunctionsApp'
>> >
>> > Any hints? Thanks in advance!
>> >
> 


0
dam4330 (47)
11/1/2006 4:38:59 PM
I'm sorry, since I'm a newbee, I didn't get the point...

Drew escreveu:

> From AFXWIN.H:
>
> #ifdef _AFXDLL
> #define DECLARE_MESSAGE_MAP() \
> private: \
>  static const AFX_MSGMAP_ENTRY _messageEntries[]; \
> protected: \
>  static AFX_DATA const AFX_MSGMAP messageMap; \
>  static const AFX_MSGMAP* PASCAL _GetBaseMessageMap(); \
>  virtual const AFX_MSGMAP* GetMessageMap() const; \
>
> #else
> #define DECLARE_MESSAGE_MAP() \
> private: \
>  static const AFX_MSGMAP_ENTRY _messageEntries[]; \
> protected: \
>  static AFX_DATA const AFX_MSGMAP messageMap; \
>  virtual const AFX_MSGMAP* GetMessageMap() const; \
>
> #endif
>
> Looks like it's declared protected.
>
> Drew
>
> <vcinquini@gmail.com> wrote in message
> news:1162384038.187946.320030@k70g2000cwa.googlegroups.com...
> > It is public. Following the complete code of CTestDLLFunctionsApp:
> >
> > class CTestDLLFunctionsApp : public CWinApp
> > {
> >
> > friend class CtestaDLLFuncoesView;
> >
> > public:
> > CTestDLLFunctionsApp();
> > virtual BOOL InitInstance();
> > afx_msg void OnAppAbout();
> > DECLARE_MESSAGE_MAP()
> > virtual int ExitInstance();
> >
> > HMODULE m_hDll;
> >
> > typedef double (*tpfFatorial)(double);
> > tpfFatorial fatorial;
> > };
> >
> > extern CTestDLLFunctionsApp theApp;
> >
> >
> >
> > Mubashir Khan wrote:
> >> seems like <<some code here>> has got the protected identifier. Try
> >> putting
> >> public: just before the fptr definition of yours ......
> >> <vcinquini@gmail.com> wrote in message
> >> news:1162323781.639008.108460@k70g2000cwa.googlegroups.com...
> >> > I've declared a function pointer in the CWinApp derived class:
> >> >
> >> > class CTestDLLFunctionsApp : public CWinApp
> >> > {
> >> >
> >> > friend class CTestDLLFunctionsView;
> >> >
> >> > public:
> >> >
> >> >       << some code here >>
> >> >
> >> > typedef double (*tpfFatorial)(double);
> >> > tpfFatorial fatorial;
> >> > };
> >> >
> >> > extern CTestDLLFunctionsApp theApp;
> >> >
> >> > And tryied to call this method in a CFormView derived class:
> >> >
> >> > void CTestDLLFunctionsView::OnBnClickedCalcFat()
> >> > {
> >> > // TODO: Add your control notification handler code here
> >> > double nNumber;
> >> > double CalcFat;
> >> >
> >> > nNumber = GetDlgItemInt(IDED_NUMBER);
> >> > CalcFat = theApp.fatorial(nNumber);
> >> >
> >> > CString csResult;
> >> > csResult.Format("Fatorial of %.0f = %.0f", nNumero, CalcFat);
> >> > SetDlgItemText(IDED_RESULT, csResult);
> >> > }
> >> >
> >> > If I declare CTestDLLFunctionsView (CFormView derived) as friend of
> >> > CTestDLLFunctionsApp (CWinApp derived), everything compile fine. If I
> >> > don't, I get the following error:
> >> >
> >> > ...\testDLLFunctionsView.cpp(88): error C2248:
> >> > 'CtestDLLFunctionsApp::fatorial' : cannot access protected member
> >> > declared in class 'CTestDLLFunctionsApp'
> >> >
> >> > Any hints? Thanks in advance!
> >> >
> >

0
vcinquini (12)
11/1/2006 8:34:31 PM
I'm sorry, I didn't get your point....

Drew escreveu:

> From AFXWIN.H:
>
> #ifdef _AFXDLL
> #define DECLARE_MESSAGE_MAP() \
> private: \
>  static const AFX_MSGMAP_ENTRY _messageEntries[]; \
> protected: \
>  static AFX_DATA const AFX_MSGMAP messageMap; \
>  static const AFX_MSGMAP* PASCAL _GetBaseMessageMap(); \
>  virtual const AFX_MSGMAP* GetMessageMap() const; \
>
> #else
> #define DECLARE_MESSAGE_MAP() \
> private: \
>  static const AFX_MSGMAP_ENTRY _messageEntries[]; \
> protected: \
>  static AFX_DATA const AFX_MSGMAP messageMap; \
>  virtual const AFX_MSGMAP* GetMessageMap() const; \
>
> #endif
>
> Looks like it's declared protected.
>
> Drew
>
> <vcinquini@gmail.com> wrote in message
> news:1162384038.187946.320030@k70g2000cwa.googlegroups.com...
> > It is public. Following the complete code of CTestDLLFunctionsApp:
> >
> > class CTestDLLFunctionsApp : public CWinApp
> > {
> >
> > friend class CtestaDLLFuncoesView;
> >
> > public:
> > CTestDLLFunctionsApp();
> > virtual BOOL InitInstance();
> > afx_msg void OnAppAbout();
> > DECLARE_MESSAGE_MAP()
> > virtual int ExitInstance();
> >
> > HMODULE m_hDll;
> >
> > typedef double (*tpfFatorial)(double);
> > tpfFatorial fatorial;
> > };
> >
> > extern CTestDLLFunctionsApp theApp;
> >
> >
> >
> > Mubashir Khan wrote:
> >> seems like <<some code here>> has got the protected identifier. Try
> >> putting
> >> public: just before the fptr definition of yours ......
> >> <vcinquini@gmail.com> wrote in message
> >> news:1162323781.639008.108460@k70g2000cwa.googlegroups.com...
> >> > I've declared a function pointer in the CWinApp derived class:
> >> >
> >> > class CTestDLLFunctionsApp : public CWinApp
> >> > {
> >> >
> >> > friend class CTestDLLFunctionsView;
> >> >
> >> > public:
> >> >
> >> >       << some code here >>
> >> >
> >> > typedef double (*tpfFatorial)(double);
> >> > tpfFatorial fatorial;
> >> > };
> >> >
> >> > extern CTestDLLFunctionsApp theApp;
> >> >
> >> > And tryied to call this method in a CFormView derived class:
> >> >
> >> > void CTestDLLFunctionsView::OnBnClickedCalcFat()
> >> > {
> >> > // TODO: Add your control notification handler code here
> >> > double nNumber;
> >> > double CalcFat;
> >> >
> >> > nNumber = GetDlgItemInt(IDED_NUMBER);
> >> > CalcFat = theApp.fatorial(nNumber);
> >> >
> >> > CString csResult;
> >> > csResult.Format("Fatorial of %.0f = %.0f", nNumero, CalcFat);
> >> > SetDlgItemText(IDED_RESULT, csResult);
> >> > }
> >> >
> >> > If I declare CTestDLLFunctionsView (CFormView derived) as friend of
> >> > CTestDLLFunctionsApp (CWinApp derived), everything compile fine. If I
> >> > don't, I get the following error:
> >> >
> >> > ...\testDLLFunctionsView.cpp(88): error C2248:
> >> > 'CtestDLLFunctionsApp::fatorial' : cannot access protected member
> >> > declared in class 'CTestDLLFunctionsApp'
> >> >
> >> > Any hints? Thanks in advance!
> >> >
> >

0
vcinquini (12)
11/1/2006 8:35:52 PM
vcinquini@gmail.com wrote:
> I'm sorry, I didn't get your point....

The point is that the macro contains "protected:" and that changes 
everything after the macro to a protected type.  So the items that you 
think are "public" are not public.  Add a "public:" into your h file 
after the "DECLARE_MESSAGE_MAP" line.

-- 
Scott McPhillips [VC++ MVP]

0
Scott
11/1/2006 10:01:05 PM
Scott McPhillips [MVP] wrote:

> Add a "public:" into your h file after
> the "DECLARE_MESSAGE_MAP" line.

Or move the DECLARE_MESSAGE_MAP stuff to the end of the class.

Jussi Jumppanen
Zeus For Windows - "The ultimate programmer's editor/IDE"
http://www.zeusedit.com

0
jussij (16)
11/1/2006 11:05:37 PM
Thanks Scott. It worked now.


jussij@zeusedit.com escreveu:

> Scott McPhillips [MVP] wrote:
>
> > Add a "public:" into your h file after
> > the "DECLARE_MESSAGE_MAP" line.
>
> Or move the DECLARE_MESSAGE_MAP stuff to the end of the class.
>
> Jussi Jumppanen
> Zeus For Windows - "The ultimate programmer's editor/IDE"
> http://www.zeusedit.com

0
vcinquini (12)
11/3/2006 11:54:41 AM
Since you're a newbie, I'd suggest avoiding friend classes entirely.  They were at best a
kludge in the C++ language (even Stroustrup has expressed regret at their existence; he
added them to salvage someone's project), and there's a really good chance that any usage
of them violates every known form of good design.  There is no reason for a view to ever
access anything in the CWinApp class, and I consider it a serious design error to ever put
anything in the CWinApp class that is used by any other component of the system, in
particular, any document, any view, or any dialog.  Note that a few base CWinApp methods
such as LoadIcon and the like are important, but you don't need *your* header file to
invoke those methods.

You should consider singleton classes as a preferred alternative.  Or even a global
variable.  I cannot imagine why anyone would need to include the CWinApp-class header in
other than the CMainFrame and CWinApp-derived modules, and in fact from time to time I
simply scan my entire source tree in a project and delete all #include directives on the
CWinApp file except in those two cases.  Most commonly I replace them with 
	#include "resource.h"
but in far more cases I just drop the include request entirely.  My personal view is if
you ever include the CWinApp header in other than the two modules previously mentioned,
you are already in an area of defective design so deep that it can quickly become
unrecoverable.  
					joe

On 1 Nov 2006 12:34:31 -0800, vcinquini@gmail.com wrote:

>I'm sorry, since I'm a newbee, I didn't get the point...
>
>Drew escreveu:
>
>> From AFXWIN.H:
>>
>> #ifdef _AFXDLL
>> #define DECLARE_MESSAGE_MAP() \
>> private: \
>>  static const AFX_MSGMAP_ENTRY _messageEntries[]; \
>> protected: \
>>  static AFX_DATA const AFX_MSGMAP messageMap; \
>>  static const AFX_MSGMAP* PASCAL _GetBaseMessageMap(); \
>>  virtual const AFX_MSGMAP* GetMessageMap() const; \
>>
>> #else
>> #define DECLARE_MESSAGE_MAP() \
>> private: \
>>  static const AFX_MSGMAP_ENTRY _messageEntries[]; \
>> protected: \
>>  static AFX_DATA const AFX_MSGMAP messageMap; \
>>  virtual const AFX_MSGMAP* GetMessageMap() const; \
>>
>> #endif
>>
>> Looks like it's declared protected.
>>
>> Drew
>>
>> <vcinquini@gmail.com> wrote in message
>> news:1162384038.187946.320030@k70g2000cwa.googlegroups.com...
>> > It is public. Following the complete code of CTestDLLFunctionsApp:
>> >
>> > class CTestDLLFunctionsApp : public CWinApp
>> > {
>> >
>> > friend class CtestaDLLFuncoesView;
>> >
>> > public:
>> > CTestDLLFunctionsApp();
>> > virtual BOOL InitInstance();
>> > afx_msg void OnAppAbout();
>> > DECLARE_MESSAGE_MAP()
>> > virtual int ExitInstance();
>> >
>> > HMODULE m_hDll;
>> >
>> > typedef double (*tpfFatorial)(double);
>> > tpfFatorial fatorial;
>> > };
>> >
>> > extern CTestDLLFunctionsApp theApp;
>> >
>> >
>> >
>> > Mubashir Khan wrote:
>> >> seems like <<some code here>> has got the protected identifier. Try
>> >> putting
>> >> public: just before the fptr definition of yours ......
>> >> <vcinquini@gmail.com> wrote in message
>> >> news:1162323781.639008.108460@k70g2000cwa.googlegroups.com...
>> >> > I've declared a function pointer in the CWinApp derived class:
>> >> >
>> >> > class CTestDLLFunctionsApp : public CWinApp
>> >> > {
>> >> >
>> >> > friend class CTestDLLFunctionsView;
>> >> >
>> >> > public:
>> >> >
>> >> >       << some code here >>
>> >> >
>> >> > typedef double (*tpfFatorial)(double);
>> >> > tpfFatorial fatorial;
>> >> > };
>> >> >
>> >> > extern CTestDLLFunctionsApp theApp;
>> >> >
>> >> > And tryied to call this method in a CFormView derived class:
>> >> >
>> >> > void CTestDLLFunctionsView::OnBnClickedCalcFat()
>> >> > {
>> >> > // TODO: Add your control notification handler code here
>> >> > double nNumber;
>> >> > double CalcFat;
>> >> >
>> >> > nNumber = GetDlgItemInt(IDED_NUMBER);
>> >> > CalcFat = theApp.fatorial(nNumber);
>> >> >
>> >> > CString csResult;
>> >> > csResult.Format("Fatorial of %.0f = %.0f", nNumero, CalcFat);
>> >> > SetDlgItemText(IDED_RESULT, csResult);
>> >> > }
>> >> >
>> >> > If I declare CTestDLLFunctionsView (CFormView derived) as friend of
>> >> > CTestDLLFunctionsApp (CWinApp derived), everything compile fine. If I
>> >> > don't, I get the following error:
>> >> >
>> >> > ...\testDLLFunctionsView.cpp(88): error C2248:
>> >> > 'CtestDLLFunctionsApp::fatorial' : cannot access protected member
>> >> > declared in class 'CTestDLLFunctionsApp'
>> >> >
>> >> > Any hints? Thanks in advance!
>> >> >
>> >
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
11/7/2006 11:08:40 AM
Reply:

Similar Artilces:

Can't Send Messages Until I Press F9 Key
This is a multi-part message in MIME format. --------------030800050502050601040701 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit After I compose a message and click Send, the message does go its way until I press F9 or choose Tools|Send/Receive. I'm using Outlook 2003 on Windows XP. In case it matters, there's a toolbar for ZoneAlrm Outlook Addin with Junk filters (I use the Zone lite firewall freebie). Is there a setting in Outlook I need to set to automatically send messages? Should I disable the Zone addin? If so, how? Thanks. ---...

Date Functions & Formatting
I'm putting together a spreadsheet showing personnel recurring training dates and whether they are overdue or current in that training. I have about 100 people with about 50 different training requirements that are recurring on different timelines (ex: Mark Smith has to take CPR class every 20 months and a driving course every 12 months). I'm trying to develop a function/format combo that lets me type in the date they last had that training, paired with the required frequency of the training, giving me a result of "CURRENT" or "OVERDUE" and turning the...

Vista Access 2003 & Ole
I have a DB I've been using, updating for several years. I use a = different BMP on every record. Today I started to update it again. Last = update a few weeks ago on my XP. Today I went with 'insert object' 'create from file'. with XP I couldn't = use JPG's so I made bmp's. Today even a bmp is just an icon. How do I get the create from file to work again ? --=20 more pix @ http://members.toast.net/cbminfo/index.html ...

Baseball Stats question: How can I get the RBI's?
I have a data table that looks like this: Code ------------------- STR-S SNK-S STR-K STR-F SNK-S STR-3 STR-2 STR-F SNK-S SNK-4 SNK-S STR-3 SNK-F STR-4 STR-O ------------------- "STR", etc at the beginning are pitch types, SNK is Sinker for example The end character is the result of the pitch, a 4 would be a home run, 3 a triple, and so forth. O is out, F is foul, S is strike --- you ge it. How can I figure the amount of RBI's? I know that it's 5, but I can' think of any automated way to calculate this, anyone got any ideas? THANK YOU!! :confused -- AVER...

SUMIF function not calculating from closed worksheet
We recently upgraded from Microsoft Office 2000 to 2007. Prior to the upgrade each department would access a spreadsheet that would load data from a common lookup spreadsheet The loading process was performed as follows: The lookup file and each department file would be opened to update the link for that month and then saved and closed. When the department head would open the department file, a question would appear asking if they wanted to update the link, if they answered no the spreadsheet would open and display the calculated data. If they answered yes, the file would o...

How can I wrap text across merged cells?
I'm using Excel 2000. I have a set of merged cells A5- E5. I have several lines of text in the cells and I want them to wrap across the merged cells and it is not working. All I get is the first line of text showing and the rest is cut off. It works if the cells are not merged, but I really need to do it in my merged cells. Is there a way to this other than manually resizing the height of the row? Instead of merging cells, have you tried the "Center Across Selection" option ? The appearence is just about identical to what you would get using merged cells, although I d...

How many Server-side rules can you put on one mailbox?
I am using Exchange Server 2003 and want to setup 52 rules on one of the mailboxes, is this possible? the hardcoded limit on space for rules is 32K...i doubt you'll be able to get 52 rules on one mailbox... -- Susan Conkey [MVP] "jmareel" <jmareel@discussions.microsoft.com> wrote in message news:6ADDDCD7-948C-415F-B194-1944C9936BC2@microsoft.com... > I am using Exchange Server 2003 and want to setup 52 rules on one of the > mailboxes, is this possible? http://support.microsoft.com/default.aspx?scid=kb;en-us;147298 -- Bharat Suneja MVP - Exchange www.zenpris...

Can't edit print styles in Outlook 2007
Weekly calendar view to print - Define print Styles - Edit "CANNOT DISPLAY THE DIALOG BOX" I'm using trial version - shouldn't be the case???? thks I'm having the same problem where I cant edit the print syles ... please let me know what ou find out. I think being able adjust the format and print the calendar is important, as I usually print my calendar. EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com Nate This is an Excel newsgroup. I would suggest posting this to an Outlook one -- HTH Nick Hodge Microsoft MVP - Excel Southampton...

non-function of cbo 'notinlist'
Hi; Second time I'm asking this question, and hope someone can suggest a cure. I'm running a form with a cbo box for data entry. I have 5 other BASICALLY IDENTICAL cbo's on the form, all of which work fine. My NotOnList event is as follows: ' Add a new policy type by typing a name in ' CoPolicy Type combo box. Dim NewCoPolicyType As Integer, TruncateName As Integer, Title As String, MsgDialog As Integer Const MB_OK = 0 Const MB_YESNO = 4 Const MB_ICONQUESTIONMARK = 32 Const MB_ICONEXCLAMATION = 64 Const MB_DEFBUTTON1 = 0, IDYES = 6, IDNO =...

unable to access mail after re-enable account
Hi, After enable an disable account and change its password, it can login to its mail account. What's happening. Is it normal? Thanks a lot What is the error message when user tries to access mailbox? Does the user still show in ADUC has having Exchange attributes? Have you looked at the MB using ESM to see if it is disconnected? "Raymond" <anonymous@discussions.microsoft.com> wrote in message news:136c01c46f11$d16f8390$a301280a@phx.gbl... > Hi, > > After enable an disable account and change its password, > it can login to its mail account. What's hap...

can't open files
I have Microsoft Office 2003 ~ all of a sudden when I go to my documents and try to open a file, I get this message "problem sending command to the program". Error 0646 and dt000 See the article "How to re-register Word when problems crop up opening files” at: http://www.word.mvps.org/FAQs/AppErrors/ReRegisterWord.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "Lost in Vegas" <Lo...

Keyboard hooking through Accessibility
I am looking for a method to hook the keyboard without running a background process. I know there are APIs for hooking (SetWindowsHookEx), but I want to avoid the overhead of running another background process for this and make the task do by windows itself. I am thinking of tweaking the Accessibility option in windows for this. Can we anyway do this by writing any script or modifying or adding registry entries for Accessibility? Or is there any Accessibility specific APIs which can re-program the Accessibility feature to do our tasks when we press a key with Accessibility feature-on. An...

Can you separate information by House?
I have two homes and want to track expenses for each home separately as well as roll up reports by category (utility, phone, etc.) for both. Is that possible? MT In microsoft.public.money, MT wrote: >I have two homes and want to track expenses for each home separately as well >as roll up reports by category (utility, phone, etc.) for both. Is that >possible? One way to do that is to use a classification. As Cal notes, Classification is tailor-made for this. Look it up in online help and then come back with questions. "MT" <MT@discussions.microsoft.com> wrot...

can't find project or library
encounter this error : can't find project or library when try to run a code which contains Calendar1.Value any help? Hi Lynn Read the info on this page http://www.rondebruin.nl/calendar.htm Excel 97-2007 It is possible you don't see it in the list, because it is installed with Access. So if you don't have that program installed you possible don't have the control. You can download the control if you don't have it (See link on the bottom of this page). -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Lynn" <moley_cruz@yahoo.com.au> wrot...

Can I delete everything on MSN Money?
Hello, I seem to have lots of problems syncronizing my MSN Money information with the web. It seems to work fine for a few months, then, for no reason, I start to get syncronization errors. I have signed up for multiple passports, because when these problems start, it seems that I get tons of multiple accounts. For example, on my one MSN Money account I have 15+ old accounts that I can't delete. 1. How do I delete ALL of the information out on MSN Money for my passport account? 2. How do I keep the syncronization from breaking in the future? Any tips or advice would be g...

Running an Excel Macro from an Access Command Button
Hi , Can anyone help me with this, I am trying to run an excel macro from an access command button. I want the macro to Bold the Headings on a excel spreadsheet. The code runs without any errors but the macro doesnt seem to work, I think I have got the line ExcelApp.ExecuteExcel4Macro "RUN(""PERSONAL.XLS!BoldHead"")" wrong The code: Private Sub cmdRunMac_Click() Dim ExcelApp As Excel.Application Dim ExcelBook As Excel.Workbook Set ExcelApp = Excel.Application ExcelApp.Visible = True Set ExcelBook = ExcelApp.Workbooks.Open("C:\Documents and Settings\...

I can no longer convert my files to pdf
I have Publisher 2003 and yesterday, my pdf menu on the top left disappeared and I can no longer convert my Publisher files to pdf. I've even uninstalled/reinstalled the Adobe Acrobat 7 and have also updated to 7.8 but still no luck. The next step was to uninstall and reinstall Publisher and still no luck. Any one know what may be the problem? Thanks. How are you trying to convert your files? When happens when you try? -- JoAnn Paules MVP Microsoft [Publisher] "darrellm" <darrellm@discussions.microsoft.com> wrote in message news:A78B7B52-981D-4FB7-8625-EAD9...

More than 7 If Functions Example is IF(A2="Bongaigaon", B2*40, ..
i want to use if Command in which 19 times If Function to be used for Example of the Function is =IF(A2="Bongaigaon", B2*40, IF(A2="Dhemaji", B2*100, IF(A2="Dhubri", B2*50, IF(A2="Dibrugarh", B2*65, IF(A2="Golaghat", B2*50, IF(A2="Guwahati", B2*20, IF(A2="hojai", B2*50, IF(A2="Jorhat", B2*60, If(A2="Kharupetia", B2*50, up to 19 times Hi - You really need to create a table with the 19 names in one column and, in the column to the right, the vaues associated with each name. That would ...

Can't get rules to run.
I can't get Outlook 2003 rules to run. I am getting my mail from a pop3 account and would like to have new mail sorted to specific folders when it arrives. I set up the rules as I did in previous versions of outlook, but they do not run automatically. I can run the rules manually and they will move the mail. I have this rule (for example Apply this rule after the message arrive from some@email.address and on this machine only move it to the somefolder folde I have tried deselecting on this machine only Thanks. Do you have an Exchange service in this profile? Are you using Cache...

Times Subtraction Whith Access
Hi I need to know how to subtract between two times variants and to get a time result (With Access). Like this: VarTime=[time1]-[time2] 10:05:40=18:05:50-08:00:10 Thanks Access really isn't intended to do things like that, but ?Format(#18:05:50# - #08:00:10#, "hh:nn:ss") 10:05:40 -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) <bennyzamir@gmail.com> wrote in message news:1175704084.566444.282820@b75g2000hsg.googlegroups.com... > Hi > > I need to know how to subtract between two times variants and to get a > time res...

How can I reset the default pie chart label "Other" to "Equity"?
I show Cash, Equities, and Fixed Income in the large pie to the left. The equity slice is further split into large, medium, and small. The problem is that the Equity slice gets relabeled as "Other". When I manuallly change it back to Equity, I lose the ability to link to any new data...so I can't use the pie chart as a template that would allow me to put new data in the table and have the pie chart adjust automaticially. How can I reset the default pie chart label to "Equity"? or is there another solution. Instead of making pie charts (which are notor...

DAO, Access, zero-length strings?
How can you set that you want to allow zero-length strings in a MS Access database with DAO? Also, how can you set that you want default values? Access doesn't seem to allow "DEFAULT" property... ...

How do you access custom entities with javascript?
I'm about to pull my hair out. I have no problem accessing system attributes, but the second I try to get or set a value for a custom attribute, I get an error (null or not an object). My problem is I am checking the changed input to a field, and if it fails a certain criteria, I need to reset the original value. The best way I could think to do this was to store this value in a new attribute and then restore it if needed. Any help would be greatly appreciated. jsankovitch@gmail.com wrote: > I'm about to pull my hair out. I have no problem accessing system > attributes, b...

Default MESSAGE CLASS for mailboxes
Hi there, Is it possible to change the default message-class that is attached to Outlook(2002) folders when a new mailbox is created? Specifically, I'd like any newly created mailbox (on our Exchange2000 server) to have IPM.Appointment.MyAppointment as the default message class for the Calendar folder (rather than IPM.Appointment). Alternatively - is it possible to change the default message class of the Calendar folder from VB? (the property seems to be Read-Only, even though it is editable via the user interface by picking the relevant form). Thanks! Uri. ...

Importing into Access 2000
I have a text file 13187 characters long. It will not import or link. Any suggestions? Hi William, Suggestions? First one is to give us a bit more information: What happens when you try? Can you import other text files? What's different about this one? Separated or delimited? How many fields? Where did it originate? On Fri, 7 Nov 2003 14:57:16 -0800, "William Madison" <anonymous@discussions.microsoft.com> wrote: >I have a text file 13187 characters long. It will not >import or link. Any suggestions? -- John Nurick [Microsoft Access MVP] Please respond in th...