Jebe replied...
Can you tell me how to open the workbook by VBA? I have incorrect logic in
the macro which is run in the open event, so my macro updates the wrong
sheet. I don't want to have to retype all the correct informaton in this
sheet so I'd like to disable this macro and then fix it.
Workbook
(1)
Incorrect
(1)
Logic
(1)
Macro
(1)
Event
(1)
Updates
(1)
Sheet
(1)
Retype
(1)
Excel - Hi Jebeh -I know you posted this awhile ago, but I found Chip Pearson's answer
Asked By ct6
13-Jul-07 11:00 AM

Hi Jebeh -
I know you posted this awhile ago, but I found Chip Pearson's answer useful
and saw your post so I decided to try to help.
The general was to open a workbook in VBA is
Workbooks.Open(fileName)
As far as disabling macros to open the workbook, you can probably get away
with
Application.EnableEvents=False
Workbooks.Open(fileName)
However, here is an even fancier way that I came up with and works really
well. This uses Excel Automation. Try This:
Sub test_Automation_Open_WB()
Dim XL As Excel.Application
Dim wb As Workbook
Dim fileName As String
Dim wb_Name As String
wb_Name = "TEST__someStuff.xls"
fileName = ThisWorkbook.Path & "\" & wb_Name
Set XL = CreateObject("Excel.Application")
With XL
.EnableEvents = False
.Visible = True
Set wb = XL.Workbooks.Open(fileName, False)
End With
End Sub
This should easily do all you need. It will open a new application of Excel
and then your workbook and will suppress all workbook.open events and pop-ups
to disable macros, etc.
Hope that helps,
Best Regards,
Chris (ct60@aol.com)

Incorrect logic evaluation Excel I have a worksheet which returns a TRUE result when evaluating whether the FALSE an entry that does not match the criteria exactly. Other worksheets in the same workbook evaluate the empty cell correctly, supplying TRUE only when the contents of the cell exactly criteria. How do I fix this problem? - - Terry Plampin Excel Crashes GPFs Discussions Worksheet (1) Workbook (1) Plampin (1) Can you post your equations and what they refer to? A couple examples will help us better facilitate answers. Thanks! - - -SA keywords: Incorrect, logic, evaluation description: I have a worksheet which returns a TRUE result when evaluating whether the
Incorrect logic evaluation Excel I have a worksheet that returns TRUE when comparing a blank or zero entry to the criteria. Other worksheets in the same workbook return correctly FALSE when the contents of the cell do not match the criteria exactly this problem? - - Terry Plampin Excel New Users Discussions Excel 2007 (1) Excel (1) Worksheet (1) Workbook (1) ROUND (1) ABS (1) Plampin (1) Lotus (1) You have bee sparse on details are using, as that makes a difference as to whether you really mean "worksheet" or "workbook". But it may be that you have given us an incorrect formula, or that you meant 0 when your wrote FALSE. It may be that you are using Excel 2007, or that you are using 2003 or earlier and meant workbook instead of worksheet. This is important in telling you how to fix things; but it particular sheet. It's in a different place if you are using 2003. - -ron keywords: Incorrect, logic, evaluation description: I have a worksheet that returns TRUE when comparing a blank or
Control program flow Excel Hello, I = 92ve been presented with a client designed workbook. Simply stated, the workbook contains a 2 column table, column 1 is the parameter name, column 2 is the will be most appreciated. Thanks in advance. Regards, Dave U Excel Programming Discussions Worksheet (1) Workbook (1) Routine (1) Module (1) Class (1) VBA (1) WhatToDo (1) Control (1) Hi Dave your wife" End Select End Function Hello, I?ve been presented with a client designed workbook. Simply stated, the workbook contains a 2 column table, column 1 is the parameter name, column 2 is the parameters from table (Param1, Param2, etc) Call AnswerQuestion If Param1 = 3D "B" Then Hilite all incorrect answers in red = 92provide feedback to user after completion End Sub Sub AnswerQuestion () For x here to evaluate answer to question(x)- -- If Param1 = 3D "A" AND answer(x) is incorrect then Hilite answer(x) in red = 92provide immediate feedback to user Next x End Sub retrieve parameters from table (Param1, Param2, etc) Call AnswerQuestion If Param1 = "B" Then Hilite all incorrect answers in red ?provide feedback to user after completion End Sub Sub AnswerQuestion () For x
Wierd Problem Excel 97 Excel This problem defies logic and I am really scratching my head over it! I would appreciate some help. I and one is W2000 SP4 I have a financial worksheet which utilises VB code in workbook and a number of VB forms. Works faultlessly on two of the XP computers (A on two other computers (C & D) , it fails with the message So, I rebuild the workbook on either C or D by doing the following: - Open a new workbook - Copy all the data in all the Sheets from the failing workbook to the new - copy the Workbook and sheet VB code from the failing workbook to the new - Export all the VB forms from the failing workbook - Import all the VB forms to the new workbook Note - there is no change to