(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?
(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.
Abbas,
It depend what do you mean under "generate Gantt Chart". Is it to draw Gantt in Excel based on Primavera data, no VBA is required for that.
This can be accomplished using straightforward Excel formulas and a basic understanding of Excel. Experienced planners have their own version of "Gantt in Excel" tool, which they can develop in just a few hours.
Regards,
Alex Lyaschenko