• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

MISSING: Microsoft Windows Common Controls-2.6.0 (SP6)

ThrottleWorks

Excel Ninja
Hi,

I am getting a bug at below mentioned line at a particular PC.

Set referenceOBJ = Workbooks.Open(ThisWorkbook.Worksheets("Dummy").Range("A1").Value & "/" & Dummy)

When I checked in ‘Reference’, I could see ‘MISSING: Microsoft Windows Common Controls-2.6.0 (SP6)’.
This macro runs smoothly at another PC however at another PC I did not see this particular reference ticked.

Can anyone please help me in this. How do I resolve this.
 
Hi ,

The code is :

Set referenceOBJ = Workbooks.Open(ThisWorkbook.Worksheets("Dummy").Range("A1").Value & "/" & Dummy)

1. Is there a worksheet tab named Dummy ?

2. What does cell A1 in the above tab contain ?

3. What does the VBA variable Dummy contain ?

4. When you type :

?referenceOBJ is nothing

what is displayed ?

5. When you type :

?typename(referenceOBJ)

what is displayed ?


Narayan
 
Hi @NARAYANK991 sir, thanks for the help.

1) Yes, there is a worksheet named "Dummy"

2) Folder path

3) Dummy variable is file name

4) False

5) Workbook

But all these results are from a PC which is working smoothly.

Please give me some time, I will update values from PC which is not working.

Good night. :)


 
If you select the missing reference then at the bottom it will show mscomctl.ocx path e.g. C:\windows\system32\mscomctl.ocx.

Can you check if the file is there (mscomctl.ocx)?

If you can locate the file there and also have administrator privilege on the machine then you can try registering using command prompt:
regsvr32 mscomctl.ocx
And then see if it fixes it.
 
Hi @NARAYANK991 sir,

?referenceOBJ is nothing = True
?typename(referenceOBJ) = Nothing

at problem facing PC.

Hi @shrivallabha , thanks a lot for the help. Am checking this and will revert. Good night. :)

Hi @Chihiro, thanks a lot for the help. Am checking this and will revert. Have a nice day ahead. :)

Hi @YasserKhalil thanks a lot for the help. Am checking this and will revert. Good night. :)
 
Hi Sachin ,

If this is on a Windows system , why are you showing a forward slash ? Should it not be a backward slash ?

Narayan
Because it doesn't matter. Test below code assuming you have directory named "C:\Temp".

Code:
Public Sub TestPathSeparator()
Dim strPath
strPath = Dir("C:/temp/*")
MsgBox strPath
strPath = Dir("C:\Temp\*")
MsgBox strPath
End Sub

In my previous office which was Japanese group we sometimes used to get pathseparator symbol as: ¥. But whenever we pasted it didn't matter to windows as it automatically interpreted it as path separator.
 
Hi Sachin ,

Since Shrivallabha has clarified that the forward slash is not a problem , the point is why you are getting TRUE when you check for :

referenceOBJ is Nothing

This means that the workbook is not being opened ; does it exist on disk ?

What is your real problem ? Is it the error message generated during code execution or is it the missing reference ?

Narayan
 
Good afternoon @NARAYANK991 sir, file is present at the folder. It gets opened at some machines, however at some machines, code generates bug.

Since the file is not opened, I get bug at below line. I guess, since macro can not open the workbook, not able to set referenceOBJ hence the bug.

For sheetcount = 1 To referenceOBJ.Worksheets.Count
referenceOBJ.Worksheets(sheetcount).Unprotect Password:="00000"
Next sheetcount
 
What is the error message that you get on this user machine?

From the description it seems that the file is in shared / network location (more than one person using it). Can you check if you can open file manually using person's login who is getting this error?
 
Hi @shrivallabha , thanks a lot for the help. Sorry for late reply.
Read your help on Saturday only but could not reply due to internet issue.

Yes, the file is at saved at shared location. No, am not able to open the file at problem facing machine.

Have a nice day ahead. :)
 
Hi @shrivallabha , thanks a lot for the help. Sorry for late reply.
Read your help on Saturday only but could not reply due to internet issue.

Yes, the file is at saved at shared location. No, am not able to open the file at problem facing machine.

Have a nice day ahead. :)
So I'd think there is some network access issue which is causing it( as Narayan & Debaser have pointed out before).
 
Back
Top