tnilesh2
asked on
Problem in Macro codes "With CreateObject("VBscript.RegExp")"
Dear Experts,
We are using some customized fuctions (codes attached below).
In most of the PC's / users it works fine but in some PC's / users it does not works & returns error - "#VALUE".
We found that below mentioned codes are not working in some users -
With CreateObject("VBscript.Reg Exp")
.Global = True
.Pattern = "[0-9]*\.?[0-9]+"
Set oMatches = .Execute(r2)
End With
These users are using MS Excel 2007.
We have checked all the basic settings (like Macro Security, Options, etc), all settings are same as other PC's in which the codes are working fine.
Please suggest how to resolve this issue.
Regards,
Nilesh.
We are using some customized fuctions (codes attached below).
In most of the PC's / users it works fine but in some PC's / users it does not works & returns error - "#VALUE".
We found that below mentioned codes are not working in some users -
With CreateObject("VBscript.Reg
.Global = True
.Pattern = "[0-9]*\.?[0-9]+"
Set oMatches = .Execute(r2)
End With
These users are using MS Excel 2007.
We have checked all the basic settings (like Macro Security, Options, etc), all settings are same as other PC's in which the codes are working fine.
Please suggest how to resolve this issue.
Regards,
Nilesh.
Private Function Film(r2 As Range, r3 As Range) As Double
Dim oRgx As Object, oMatches As Object
With CreateObject("VBscript.RegExp")
.Global = True
.Pattern = "[0-9]*\.?[0-9]+"
Set oMatches = .Execute(r2)
End With
Film = Application.Round(oMatches(1) / 1000 * oMatches(2) / 1000 * oMatches(3) * (1000 / r3), 3)
End Function
Check their system32 directory for this file
vbscript.dll
If the file is present then Close Excel and click on Windows Start ~~> Run and type this
regsvr32 vbscript.dll
and press enter.
Now Try it.
Sid
vbscript.dll
If the file is present then Close Excel and click on Windows Start ~~> Run and type this
regsvr32 vbscript.dll
and press enter.
Now Try it.
Sid
lolzzz Same Time but slow fingers ;)
Sid
Sid
lagta hai ke post karne se pehlay cheenk mari thi is liye deir ho gaee
ha ha ha ha
ASKER
Thanks both of you,
The file "vbscript.dll" is missing. Can I copy & paste it from some other user?
Please suggest.
Regards,
Nilesh.
The file "vbscript.dll" is missing. Can I copy & paste it from some other user?
Please suggest.
Regards,
Nilesh.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
Saqib