moone009 0 Junior Poster in Training

I am trying to change the order of how my excel worksheets tab appear in my workbook.

I have a .net app that parses and pulls data from sql and exports it to excel.

Currently it spits out 5 tabs and the Summary tab is in the middle.

I want the Summary worksheet to be the first tab in the workbook.

Currently the code below keeps erroring out. What am I doing wrong?

xlWorkSheet.Move(Before:="Summary", After:="Data")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.