Re: References for VBA



That's not so much what I meant (sorry for the delay...been out of town).
If you try some code in VBA from within whatever application and it doesn't
work, how do I know what references to check to MAKE it work, since the help
files never say "this functionality only works if you reference blah blah"

Thanks;

Amy

"Jonathan West" <jwest@xxxxxxxx> wrote in message
news:OLn3acQyFHA.3588@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Amy,
>
> The thing to do is to open the VB editor in each app in turn, go to
> Project, References, and see which items are checked. Then check the same
> ones when using code that controls the app from outside.
>
> In addition, you might need to quality some variable definitions. For
> instance, if you are controlling Word from VB6, then if you have an object
> variable defined as being a Shape, you will need to change this to
> Word.Shape, so that it doesn't clash with VB6's own Shape object.
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
> Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
>
> "Amy Blankenship" <Amy_nospam@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:ucRfwWGyFHA.788@xxxxxxxxxxxxxxxxxxxxxxx
>> That was just an example. I had to add that reference in Access to get
>> the same code I was using in Word to work there, even though there was no
>> hint in the help for either app that a reference was needed for this. So
>> I'd like to find a list of the references you have to have, well,
>> referenced for the various features to work.
>>
>> Thanks;
>>
>> Amy
>>
>> "Jonathan West" <jwest@xxxxxxxx> wrote in message
>> news:OCYVwIGyFHA.1252@xxxxxxxxxxxxxxxxxxxxxxx
>>> Hi Amy,
>>>
>>> Step back a bit. Its not clear what you are trying to achieve. When you
>>> are coding from within Word VBA, the Office and Word object references
>>> are checked by default. What environment are you working in?
>>>
>>> --
>>> Regards
>>> Jonathan West - Word MVP
>>> www.intelligentdocuments.co.uk
>>> Please reply to the newsgroup
>>>
>>>
>>> "Amy Blankenship" <Amy_nospam@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
>>> news:Ohve0rwxFHA.4080@xxxxxxxxxxxxxxxxxxxxxxx
>>>> Hi, all;
>>>>
>>>> The help makes it look like you can use Application.FileDialog and
>>>> other objects as is. But they really don't work unless you load a
>>>> reference to some version of the office object library.
>>>>
>>>> Is there any listing of what things in the help require references to
>>>> be loaded, and where these references must be loaded from (and what
>>>> version(s) of Office they work in)?
>>>>
>>>> Thanks;
>>>>
>>>> Amy
>>>>
>>>
>>>
>>
>>
>


.



Relevant Pages

  • Re: VBA errors in 2007 (works fine in 2003)
    ... It's just breaking on the Mac version of Excel. ... Pak allowing you to call functions in the ATP from within VBA. ... menu in VBA, choose References, and select "atpvbaen.xls". ... If there is the possibility of a name collision (two or more libraries ...
    (microsoft.public.excel.misc)
  • Re: VBA errors in 2007 (works fine in 2003)
    ... The file is working as intended now in Excel 2003 and 2007. ... Pak allowing you to call functions in the ATP from within VBA. ... menu in VBA, choose References, and select "atpvbaen.xls". ... If there is the possibility of a name collision (two or more libraries ...
    (microsoft.public.excel.misc)
  • Re: VBA errors in 2007 (works fine in 2003)
    ... The file is working as intended now in Excel 2003 and 2007. ... Pak allowing you to call functions in the ATP from within VBA. ... menu in VBA, choose References, and select "atpvbaen.xls". ... If there is the possibility of a name collision (two or more libraries ...
    (microsoft.public.excel.misc)
  • Re: VBA errors in 2007 (works fine in 2003)
    ... It appears to be getting through the UnHideSheets macro, ... Pak allowing you to call functions in the ATP from within VBA. ... menu in VBA, choose References, and select "atpvbaen.xls". ... If there is the possibility of a name collision (two or more libraries ...
    (microsoft.public.excel.misc)
  • Re: VBA errors in 2007 (works fine in 2003)
    ... It's just breaking on the Mac version of Excel. ... Pak allowing you to call functions in the ATP from within VBA. ... menu in VBA, choose References, and select "atpvbaen.xls". ... If there is the possibility of a name collision (two or more libraries ...
    (microsoft.public.excel.misc)