Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MISSING: OCWebPreview ActiveX Control Module

Code works in XL2000 but not in XP!?
Please can anybody help?......and thanks in advance for looking.

I'm using the code below on a number input macro to check to see if the
number entered is the same as the validation code in hidden sheet1!A1.

It works perfectly in Excel 2000 but a user reports that in Excel XP he
gets the message: "Compile error in module 2". When I looked at it it
appears that the problem is at the point of 'MyNum' in the 6th row.

-------------------------------------------------------------

Sub InputNumber()
Application.ScreenUpdating = False
Application.EnableCancelKey = xlDisabled
Sheets("Sheet1").Visible = True
Sheets("Sheet1").Select
myNum = InputBox("Please enter your 8 digit validation code. If you
don't know it please contact XXXX", "Box Title")
If myNum = "" Then
Sheets("Sheet1").Visible = False
Sheets("Setup Sheet").Select
Application.ScreenUpdating = True
Exit Sub
End If
Range("A1").Value = myNum
Sheets("Sheet1").Visible = xlSheetVeryHidden

Sheets("Setup Sheet").Select
Application.ScreenUpdating = True
End Sub
-------------------------------------------------------------

Jim Rech advised me to look in ‘Tools’ and ‘References…’ in the VBE to
see if anything was listed as ‘missing’, and in there it says "MISSING:
OCWebPreview ActiveX Control Module".

This needs to be usable by anyone with XL2000 or later. Can you anyone
suggest a work-around that would enable this to happen? Different code
maybe that gives the same results?

How can I overcome this even on a single PC?

Can I get an auto-open macro to make whatever changes are required to
make it work or should I look for an alternative code that won't cause
this to happen?

Thanks for your help.

Regards,


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default MISSING: OCWebPreview ActiveX Control Module

It doesn't sound like you are using
OCWebPreview ActiveX Control Module



So the easiest would be to remove it from the reference list on your
computer, then save the file, then redistribute. (go into tools=References
in the VBE and uncheck this reference)



The problem is probably caused by this missing reference, even though it has
nothing to do with the error flagged. Once you get rid of the reference,
your problem should go away.



--

Regards,

Tom Ogilvy



"Big Chris" wrote in message
...
Code works in XL2000 but not in XP!?
Please can anybody help?......and thanks in advance for looking.

I'm using the code below on a number input macro to check to see if the
number entered is the same as the validation code in hidden sheet1!A1.

It works perfectly in Excel 2000 but a user reports that in Excel XP he
gets the message: "Compile error in module 2". When I looked at it it
appears that the problem is at the point of 'MyNum' in the 6th row.

-------------------------------------------------------------

Sub InputNumber()
Application.ScreenUpdating = False
Application.EnableCancelKey = xlDisabled
Sheets("Sheet1").Visible = True
Sheets("Sheet1").Select
myNum = InputBox("Please enter your 8 digit validation code. If you
don't know it please contact XXXX", "Box Title")
If myNum = "" Then
Sheets("Sheet1").Visible = False
Sheets("Setup Sheet").Select
Application.ScreenUpdating = True
Exit Sub
End If
Range("A1").Value = myNum
Sheets("Sheet1").Visible = xlSheetVeryHidden

Sheets("Setup Sheet").Select
Application.ScreenUpdating = True
End Sub
-------------------------------------------------------------

Jim Rech advised me to look in 'Tools' and 'References.' in the VBE to
see if anything was listed as 'missing', and in there it says "MISSING:
OCWebPreview ActiveX Control Module".

This needs to be usable by anyone with XL2000 or later. Can you anyone
suggest a work-around that would enable this to happen? Different code
maybe that gives the same results?

How can I overcome this even on a single PC?

Can I get an auto-open macro to make whatever changes are required to
make it work or should I look for an alternative code that won't cause
this to happen?

Thanks for your help.

Regards,


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default MISSING: OCWebPreview ActiveX Control Module

Tom,

Thanks for the advice.....I looked on my PC and I can't even see
'OCWebPreview ActiveX Control Module' in the list! There are only four
checked, in this order:

Visual Basic for Applications
Microsoft Excel 9.0 Object Library
OLE Automation
Microsoft Office 9.0 Object Library

Any other thoughts please? I'm totally stuck on this.

Many thanks,

Chris.

-------------------------------------------------------------------


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default MISSING: OCWebPreview ActiveX Control Module

Make sure the workbook that is generating the message is the active project
(not just the activeworkbook in Excel, but the project that is highlighted
in the project explorer in the VBE). Then go into tools=References.

The message has to be coming from somewhere and your project is the logical
source based on what you have stated.

--
Regards,
Tom Ogilvy


"Big Chris" wrote in message
...
Tom,

Thanks for the advice.....I looked on my PC and I can't even see
'OCWebPreview ActiveX Control Module' in the list! There are only four
checked, in this order:

Visual Basic for Applications
Microsoft Excel 9.0 Object Library
OLE Automation
Microsoft Office 9.0 Object Library

Any other thoughts please? I'm totally stuck on this.

Many thanks,

Chris.

-------------------------------------------------------------------


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 Form Control/ActiveX Control font difference Nikko963 Excel Discussion (Misc queries) 0 April 15th 09 04:21 PM
ActiveX control with chart Tanihera Charts and Charting in Excel 1 April 11th 06 05:36 PM
Tab to an ActiveX control? Karin Excel Discussion (Misc queries) 0 July 6th 05 05:08 AM
ActiveX control jacob Excel Programming 1 November 22nd 03 06:03 PM
Missing ActiveX Frame control in Excel 2000 Judy Hopkins Excel Programming 0 July 30th 03 10:40 PM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"