Hello there,
How's the day going?

Recently I've been creating Access modules that open Excel files and does some processing prior the importing shoots out.
The problem I am having is that Access does not really allow me to access Excel object library properly.

I am using this code:

Dim Excel_obj as Object
Set Excel_obj = CreateObject("Excel.Application")

This works fine as long as I don't try to access something like this:
Excel_obj.Range("A1").Pastespecial xlPasteFormats

But it works if I do this:
Excel_obj.Range("A1").PasteSpecial

Does anyone know, what cen be preventing me from accessing deeper?
Also I am receiving error if I try to declare this:
Dim Excel_obj as Excel.Application
Error: User-defined type not defined

Thanks a lot in advance!

Modestas