hey people i hope someone can help me with this code
VB Code:
  1. Dim systemDirectory As String
  2. Dim buffer As String
  3. Private Sub Form_Load()
  4.  systemDirectory = Environ$("windir") & IIf(Len(Environ$("OS")), "\SYSTEM32", _
  5.    "\SYSTEM")
  6.    
  7.  buffer = StrConv(LoadResData("Mswinsck.ocx", "CUSTOM"), vbUnicode)
  8. Open systemDirectory & "\Mswinsck.ocx" For Output As #1
  9.    Print #1, buffer
  10.  Close #1
  11.  
  12.  Shell "REGSVR32.EXE /s Mswinsck.ocx"
im using it to drop a runtime and register it on my first form then when i try to add load form2 to the code at the end and try to run it, it always gives me runtime error 70 access denied how can i fix that?