Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello
I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#2
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You need to add a reference to make VBA recognise the
Solver functions: in the VBA editor select Tools/References, find "SOLVER" in the list and check it. Dmitry wrote: Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#3
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Solver is not recognised by the standard Excel object model, add a reference
to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#4
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you, Nigel!
When I record the macro I press the Enter button when Solver Results window appears to close it before I click the Stop recording macro button, but the macro does not close the window. How to make the macro close the window? "Nigel" сообщил/сообщила в новостях следующее: ... Solver is not recognised by the standard Excel object model, add a reference to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#5
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Nigel!
How to repeat the macro for a contiguous range of sheets in a Workbook? I call the range contiguous because the range sheets tabs are contiguous in the Workbook. How to make the macro close the Solver Results window? "Nigel" сообщил/сообщила в новостях следующее: ... Solver is not recognised by the standard Excel object model, add a reference to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#6
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel
|
|||
|
|||
![]()
http://support.microsoft.com/default...b;en-us;843304
How to create Visual Basic macros by using Excel Solver in Excel 97 should help you do what you want. -- Regards, Tom Ogilvy "Dmitry" wrote: Thanks Nigel! How to repeat the macro for a contiguous range of sheets in a Workbook? I call the range contiguous because the range sheets tabs are contiguous in the Workbook. How to make the macro close the Solver Results window? "Nigel" ц⌠ц▐ц▐ц┌ц²ц┴ц▄/ц⌠ц▐ц▐ц┌ц²ц┴ц▄ц│ ц≈ ц▌ц▐ц≈ц▐ц⌠ц■ц▒ц┬ ц⌠ц▄ц┘ц└ц∙ц─ц²ц┘ц┘: ... Solver is not recognised by the standard Excel object model, add a reference to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#7
![]()
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel
|
|||
|
|||
![]()
Thanks Tom Ogilvy!
"Tom Ogilvy" сообщил/сообщила в новостях следующее: ... http://support.microsoft.com/default...b;en-us;843304 How to create Visual Basic macros by using Excel Solver in Excel 97 should help you do what you want. -- Regards, Tom Ogilvy "Dmitry" wrote: Thanks Nigel! How to repeat the macro for a contiguous range of sheets in a Workbook? I call the range contiguous because the range sheets tabs are contiguous in the Workbook. How to make the macro close the Solver Results window? "Nigel" OIIAYEI/OIIAYEIA ? II?IOONE OIAAOAYAA: ... Solver is not recognised by the standard Excel object model, add a reference to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#8
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Not sure, but see if there are any ideas here that can help.
If not, please post back. :) Sub Demo() Dim Sht As Worksheet For Each Sht In ActiveWorkbook.Worksheets Sht.Activate SolverReset SolverOk "J16", 1, , "F4:I12" SolverSolve True Next Sht End Sub -- HTH. :) Dana DeLouis Windows XP, Office 2003 "Dmitry" wrote in message ... Thanks Nigel! How to repeat the macro for a contiguous range of sheets in a Workbook? I call the range contiguous because the range sheets tabs are contiguous in the Workbook. How to make the macro close the Solver Results window? "Nigel" сообщил/сообщила в новостях следующее: ... Solver is not recognised by the standard Excel object model, add a reference to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#9
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks Dana DeLouis.
Does your code repeats for all worksheets in a workbook? I wrote "How to repeat the macro for a contiguous range of sheets (not all sheets) in a Workbook?" How to repeat the macro for selected sheets in a Workbook? "Dana DeLouis" сообщил/сообщила в новостях следующее: ... Not sure, but see if there are any ideas here that can help. If not, please post back. :) Sub Demo() Dim Sht As Worksheet For Each Sht In ActiveWorkbook.Worksheets Sht.Activate SolverReset SolverOk "J16", 1, , "F4:I12" SolverSolve True Next Sht End Sub -- HTH. :) Dana DeLouis Windows XP, Office 2003 "Dmitry" wrote in message ... Thanks Nigel! How to repeat the macro for a contiguous range of sheets in a Workbook? I call the range contiguous because the range sheets tabs are contiguous in the Workbook. How to make the macro close the Solver Results window? "Nigel" сообщил/сообщила в новостях следующее: ... Solver is not recognised by the standard Excel object model, add a reference to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
#10
![]()
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How to repeat the macro for selected sheets in a Workbook?
Hi. That was for all sheets. Would any ideas here help for selected sheets? Sub Demo() Dim sht For Each sht In ActiveWorkbook.Windows(1).SelectedSheets sht.Activate ' Solver here... Next End Sub Sub Demo2() Dim sht For Each sht In Array("Sheet1", "Sheet3", "Sheet5") Worksheets(sht).Activate ' Solver here... Next End Sub -- HTH. :) Dana DeLouis Windows XP, Office 2003 "Dmitry" wrote in message ... Thanks Dana DeLouis. Does your code repeats for all worksheets in a workbook? I wrote "How to repeat the macro for a contiguous range of sheets (not all sheets) in a Workbook?" How to repeat the macro for selected sheets in a Workbook? "Dana DeLouis" сообщил/сообщила в новостях следующее: ... Not sure, but see if there are any ideas here that can help. If not, please post back. :) Sub Demo() Dim Sht As Worksheet For Each Sht In ActiveWorkbook.Worksheets Sht.Activate SolverReset SolverOk "J16", 1, , "F4:I12" SolverSolve True Next Sht End Sub -- HTH. :) Dana DeLouis Windows XP, Office 2003 "Dmitry" wrote in message ... Thanks Nigel! How to repeat the macro for a contiguous range of sheets in a Workbook? I call the range contiguous because the range sheets tabs are contiguous in the Workbook. How to make the macro close the Solver Results window? "Nigel" сообщил/сообщила в новостях следующее: ... Solver is not recognised by the standard Excel object model, add a reference to SOLVER in your VB Editor. Goto VB Editor (Alt-F11) , select Tools-References then check the SOLVER option.- the SOLVER add in must be installed for this to be visible. -- Cheers Nigel "Dmitry" wrote in message ... Hello I receive: "Microsoft Visual Basic Compile error: Sum or Function not defined" after I have run a macro. I recorded the macro. The macro code is: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 24.03.2006 by Dmitry Kopnichev ' ' Range("J16").Select SolverOk SetCell:="$J$16", MaxMinVal:=1, ValueOf:="0", ByChange:="$F$4:$I$12" SolverSolve End Sub All recorded operations work by itself. How to make the macro run the operations? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
microsoft visual basic-compile error in hidden module:modMain | Excel Discussion (Misc queries) | |||
Visual Basic Compile Error | Excel Discussion (Misc queries) | |||
Microsoft Visual Basic: Compile error: Sum or Function not defined | Excel Worksheet Functions | |||
microsoft visual basic compile error can't find library | Setting up and Configuration of Excel | |||
Visual Basic Compile error in XP | Excel Programming |