Hello, Mahesh.
I understand that you are trying to do basic communication via the GPIB to your Agilent instrument. I will assume for this discussion that you have a National Instruments GPIB card such as a PCI-GPIB.
There are a few shipping examples that come with the NI-488.2 driver that should be helpful to you. The default installation directory for these examples is C:\Program Files\National Instruments\NI-488.2\Languages\Visual Basic. I think that the "Query4882" project is a good place to start, though there are others in that directory that may be more applicable to your particular situation.
If I have not answered your question, please respond here and I will get back to you.
Thanks,
Scott B.
Applications Engineer
National Instruments