Checking IsObject from Variable String Types
This is working fine
Set ObjName = Description.Create
msgbox IsObject(ObjName) 'Answer is True
msgbox Not(IsObject(ObjName)) 'Answer is False
but my requirement is something else, I have object names stored in the variable
Something like this
ObjName = "Google" (form database or external source)
NewObjId = "Set " & ObjName & "= Description.Create"
' To test this above code put a watch for Google it will show this is an object, but my Next steps is getting failed
msgbox IsObject(ObjName) ' gives false
msgbox IsObject(google) ' gives true (but i cant put google directly because i dont know the name and its not hard coded)
I know the reason, here google is a string so it is "Google", value google with double quotes, i cant use Type conversion function "CObj(ObjName)" if i do this then there will not be any reason to check IsObject and i'll always get "TRUE"
and i am even not able to assign executed value to a variable or directly use execute statement
a = Execute(ObjName)
Any solution friends?
Does what i have written is difficult to understand? please tell me
Re: Checking IsObject from Variable String Types
hey found solution.. and its very simple