Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic and Excel questions

Status
Not open for further replies.

FoxProProgrammer

Programmer
Joined
Apr 26, 2002
Messages
967
Location
US
Hi folks,

I have a fair amount of experience using Visual Basic with Access applications, and am trying to use some of that experience to write macros in Excel. In VB for Access, you can use DoCmd.SetWarnings False to disable warnings that are presented to users. I typed DoCmd. in Excel and get an object required error. Is this due to a limitation in VB for Excel or do I just need to install a reference to the proper library? In general I am confused by the relationship between VB for Access and other Office products. Isn't it the same VB? If so, why doesn't the same VB syntax work no matter which Office application I am using it with?

Thanks for any assistance,

dz
dzaccess@yahoo.com
 
I don't have any experience of Access VB but I do know that historically it comes from a different background to the rest of Office VB.

It sounds like your DoCmd.SetWarnings is similar to DisplayAlerts in Excel. Have a look in VB help to see if it does a similar job.

HTH

bandit600
 
Thanks, bandit600. The syntax that you provided does what I was looking for in Excel. I still don't understand why Microsoft provides different syntax for the same functions in different office products, but oh well, that's Microsoft.

Cheers,


dz
dzaccess@yahoo.com
 
It's cos they're based on entirely different object models whereas excel / word for example have (kinda) similar hieracical structures whereas Access is (I believe) organised around several different "containers" Rgds
Geoff

Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur
 
I personally think it's because the development teams for each application didn't work together! Each team developed it's project independantly and there was no communication between developers!! Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top