×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VFP VBA to Excel

VFP VBA to Excel

VFP VBA to Excel

(OP)
   xThisSheet.VPageBreaks(1).DragOff direction=xltoright , RegionIndex:=1

how do I change this VBA to Foxpro format?
i want to set move the pagebreak line to the right column.

thanks

RE: VFP VBA to Excel

You don't need to change it to VFP.  You would be instantiating an Excel object, so the properties you set and methods you invoke of that object will be specific to Excel.

If you have Office 2000, search for the file VBAWRD9.CHM (there may be a slightly different file name for earlier versions of Office); it will contain the documentation on the Office object model, including the names and parameters for the methods.

If you need further details, please let me know.

Robert Bradley

FoxDev - Visual FoxPro Development

RE: VFP VBA to Excel

(OP)
I want to know detail. but this statment can't accept at VFP .....

RE: VFP VBA to Excel

Kitnba,

My understanding is that VBA can reference variables by name, but VFP can't so you have to list the variables. Try this:-

xThisSheet.vPageBreaks(1).DragOff(-4161,1)

Alternatively, you can define variables using VFP's preprocessor command #DEFINE.

You can get the values of Excel object variables by pressing Alt-F11 in Excel, which brings up VBA and then press F2 which brings up the Object Browser (or it does prior to Office 2000).

If you are doing a lot of automation of Office with VFP, then I can recommend a new book

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close