Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can anyone help me to convert a macro code to vfp code?

Status
Not open for further replies.

jhei

Programmer
Sep 9, 2011
2
PH
Hi there!,

I am creating an automated excel report in my application and i was trying to create a format that will group data/ rows. i used the macro and recorded it to see the codes my problem now is i want to translate it or convert it to vfp codes.. can anyone help me here is the code

Rows("2:7").Select
Selection.Rows.Group
Rows("3:7").Select
Rows("2:6").Select
Selection.Rows.Group
ExecuteExcel4Macro "SHOW.DETAIL(1,6,FALSE,,1)"

Thanks

Bert
 
Assuming you have an object reference to the active sheet:

Code:
oSheet.Rows(2,7).Select

should work, and that covers most of this.

The ExecuteExcel4Macro command might be problematical, but if you still have a reference to the Excel Application object you should be able to invoke the command through the WordBasic object:

Code:
oApp.WordBasic.ExecuteExcel4Macro

Although with this one you may need to fiddle, particularly getting the parameters right.

 
found a solution thanks anyway
.ActiveSheet.Outline.ShowLevels(1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top