Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

VBScript xlHAlignLeft


My VBscript for columnwidth is working but the alignment is not.

Any ideas why this would not work in an inline process??

 

objCurrentSheet.Columns("A").ColumnWidth = 35
objCurrentSheet.Columns("B").ColumnWidth = 125
objCurrentSheet.Columns("A").HorizontalAlignment = xlHAlignLeft

Labels (1)
1 Reply
marcus_sommer
MVP
MVP

The xl-constants won't be regocnized in each case. You could try it only with xlLeft but mostly are the numeric equivalent from these xl-constants better to use. In your case try it with 3:

objCurrentSheet.Columns("A").HorizontalAlignment = xlHAlignLeft

Helpful is the using of the excel-vba direct-window and there:

?VarType(xlHAlignLeft) // and then enter

- Marcus