Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving columns in Excel programmatically
Message
 
 
To
13/04/2011 13:49:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01507161
Message ID:
01507165
Views:
95
This message has been marked as the solution to the initial question of the thread.
Those are Excel constants and you can use VFP Object browser to get them. You also have to convert named parameters to position based. Something like
#DEFINE xlShiftDown -4121
#DEFINE xlShiftToLeft -4159
#DEFINE xlShiftToRight -4161
#DEFINE xlShiftUp -4162

oRange = oSheet.Columns("G")
oRange.Cut()
oRange2 = oSheet.Columns("B")
oRange2.Insert(xlShiftToRight) 
>How may I move a column in Excel programmatically? Code in macro doesn't work properly in VFP.
>
>Columns("BC:BC").Select
>Selection.Cut
>Range("C1").Select
>Selection.Insert Shift:=xlToRight
>
>"Insert Shift" nor "xlToRight" are not recognized by VFP.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform