prabha_friend
Prabhakaran Karuppaih
- Local time
- Tomorrow, 05:09
- Joined
- Mar 22, 2009
- Messages
- 1,037
Suppose I am setting reference to an Excel application in an Access VBA project (an mdb) and creating an excel application in a procedure called sub_proc1(). Suppose I want to work with Excel application and its objects created by the proc1 in an another procedure called. Suppose Test_format(). But I get the error 'Object variable or with Variable not set'. Is setting the COM Reference is not only enought. I want to understand fundamentals too. Kindly help.
Sub test_format()
Dim cformat As String
cformat = "0.00_);[Red](0.00)"
Excel.Application.ActiveWorkbook.ActiveSheet.Cells(6, 3).Select
Selection.CellFormat = cformat
End Sub
Sub test_format()
Dim cformat As String
cformat = "0.00_);[Red](0.00)"
Excel.Application.ActiveWorkbook.ActiveSheet.Cells(6, 3).Select
Selection.CellFormat = cformat
End Sub