View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Suraj[_2_] Suraj[_2_] is offline
external usenet poster
 
Posts: 5
Default Getting "Object Variable or With Block Variable not set" error

Hi,

I am getting the error "Object Variable or With Block Variable not set"
when I try to execute following VBA code.

Dim a As Excel.Application
Dim wb As Workbook

For Each wb In a.Workbooks
wb.Save
Next wb

Please let me know what is the problem

Thanks,
suraj