I do not get any errors when running the build. MsgBox("ColumnReset: " & ErrorToString()) The code used is as below: Sub ColumnReset()Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Date1", Title:="Delivery", Width:=15, Align:=PjAlignment.pjCenter, ColumnPosition:=21, AlignTitle:=PjAlignment.pjCenter, HeaderAutoRowHeightAdjustment:=False, HeaderTextWrap:=False) HeaderAutoRowHeightAdjustment:=True, HeaderTextWrap:=True HeaderAutoRowHeightAdjustment:=False, HeaderTextWrap:=True HeaderAutoRowHeightAdjustment:=True, HeaderTextWrap:=False HeaderAutoRowHeightAdjustment:=False, HeaderTextWrap:=False My earlier reply was based on the following 4 combinations. Please find the code used below to set the title row. I will try the OrganizerMoveItem Method and update you the progress. I mean my custom view before I let other use. Like this to the first or last TableEdit statement, it keeps unnecessary bulk out of the statements. Note, this argument, and some others like it, only need to be added to one TableEdit statement and not to each statement. So, the "way around" this is to create a new table, not simply edit the existing table, as I noted in the first paragraph.Īs far as the header row height, add the AutoHeaderRowHeightAdjustment argument to the TableEdit Method. So when your code tries to change the title of the 9th column, there is none If you then look at the number of columns in the default Entry table, there are 0-8, the "Add New Column" is not counted as a column, it's an option. Column counting starts at zero and since the first column is locked, the first column (i.e. Okay, so why does your code fail when the column position is 9? Because in the default Entry table, the first column is locked (i.e. It's just good practice not to mess with the built-in Views, Tables, etc. Give your new table it's own unique name instead of re-defining the existing Entry table. create a new view table), then you need to include the OverwriteExisting and NewFieldName arguments in the FieldEdit Method. However, if you intended to change the fields (i.e. For example, you change the title of the Indicators field but that only changes the title of the column, it does not change theįield. What are you trying to do? I assume you want to create a new "Entry" table but that's not quite what your code does. How can I prevent this?Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Indicators", Title:="Sketch", Width:=6, Align:=PjAlignment.pjLeft, ColumnPosition:=0, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="text5", Title:="Ref", Width:=8, Align:=PjAlignment.pjLeft, ColumnPosition:=1, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Text6", Title:="Buyer", Width:=10, Align:=PjAlignment.pjLeft, ColumnPosition:=2, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Name", Title:="Style", Width:=20, Align:=PjAlignment.pjLeft, ColumnPosition:=3, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Text1", Title:="PO #", Width:=15, Align:=PjAlignment.pjLeft, ColumnPosition:=4, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Text8", Title:="Color", Width:=15, Align:=PjAlignment.pjLeft, ColumnPosition:=5, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Number15", Title:="Seq", Width:=8, Align:=PjAlignment.pjRight, ColumnPosition:=6, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Number1", Title:="Order Qty", Width:=8, Align:=PjAlignment.pjRight, ColumnPosition:=7, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Number3", Title:="Split Qty", Width:=8, Align:=PjAlignment.pjRight, ColumnPosition:=8, AlignTitle:=PjAlignment.pjCenter)Īpplication.TableEdit(Name:="Entry", TaskTable:=True, FieldName:="Date1", Title:="Delivery", Width:=15, Align:=PjAlignment.pjCenter, ColumnPosition:=9, AlignTitle:=PjAlignment.pjCenter) Is there a way around?Īlso I find the header row height reduced to single row in Task Sheet view after TableApply(). I think the error crops up when the number of fields edited exceeds the number displayed/visible. These fields are not displayed correctly in the Gantt Chart view when code is run. View to Task Sheet view I can see 8 fields have been correctly updated. When I run TableApply() I get the error "This is not a valid number for the ColumnPosition argument" but I when I switch from Gantt Chart I am trying to TableReset() the "Entry" table and TableEdit() 22 fields which already there.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |