ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Accessing Menu Options from VB Code (https://www.excelbanter.com/excel-programming/332499-accessing-menu-options-vbulletin-code.html)

Zuhair

Accessing Menu Options from VB Code
 
Hi
I need some help regarding access to the menu options in the Excel from VB
Code,
Acutally i want to disable the auto calculation option for the excel object
I am opening currently i have to set it mannually from the tools - Options
, otherwise when i get a Message box asking for recalculation of formulas
when the code is accessed from the webpage
I just want to disable this option from my code if it is enable
Any help in this regard will be very help full

(Its my first post on this group so if i am posting in wrong are do guide
me -Thanks)

Zuhair



Roman[_4_]

Accessing Menu Options from VB Code
 
Hi Zuhair,
am not sure if this is what you need:

Application.calculation = xlManual


DM Unseen

Accessing Menu Options from VB Code
 
Application.Calculation = xlCalculationManual

DM Unseen

PS there are other properties/events as well that control calcuation,
but this is what you asked for.


Zuhair

Accessing Menu Options from VB Code
 
Thanks for the help
DM Unseen can u refer a link from where i can get information about the
properties/events of excel
"Zuhair" wrote in message
...
Hi
I need some help regarding access to the menu options in the Excel from VB
Code,
Acutally i want to disable the auto calculation option for the excel

object
I am opening currently i have to set it mannually from the tools -

Options
, otherwise when i get a Message box asking for recalculation of formulas
when the code is accessed from the webpage
I just want to disable this option from my code if it is enable
Any help in this regard will be very help full

(Its my first post on this group so if i am posting in wrong are do guide
me -Thanks)

Zuhair





keepITcool

Accessing Menu Options from VB Code
 
Zuhair...

in excel
open VBeditor
press help
start with making a print of "Excel object Model"
hang it next to your PC :)

for the rest:

the LOCALS window in the VBE gives you tons of information.
try following:

Sub InspectYourVariables()
Dim app As Application
Dim wkb As Workbook
Dim wks As Worksheet
Dim rng As Range
Dim wnd As Object
Set app = Application
Set wkb = ActiveWorkbook
Set wks = ActiveSheet
Set rng = ActiveWindow.RangeSelection
For Each wnd In Application.VBE.Windows
If wnd.Type = 4 Then wnd.Visible = True
Exit For
Next
Stop
End Sub


note:
excel is easy to learn by trial and error.
vba is easy AND fun BUT you need to have some basic knowledge.

Save yourself the frustration of not understanding the basics.
BUY, READ & STUDY a (decent) book (e.g. walkenbach's Excel Power
Programming with VBA)



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Zuhair wrote :

Thanks for the help
DM Unseen can u refer a link from where i can get information about
the properties/events of excel
"Zuhair" wrote in message
...
Hi
I need some help regarding access to the menu options in the Excel
from VB Code,
Acutally i want to disable the auto calculation option for the excel

object
I am opening currently i have to set it mannually from the tools -

Options
, otherwise when i get a Message box asking for recalculation of
formulas when the code is accessed from the webpage
I just want to disable this option from my code if it is enable
Any help in this regard will be very help full

(Its my first post on this group so if i am posting in wrong are do
guide me -Thanks)

Zuhair



DM Unseen

Accessing Menu Options from VB Code
 
Zuhair,

keepITcool mentioned a good book. There are severeal good books on
Excel programming, If you know VB, pls use the object editor in the VBA
Excel editor to lookup properties & events

DM Unseen



All times are GMT +1. The time now is 05:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com