Excelフォームをループしてループを作成するたびに新しいExcelを作成することで、AccessフォームからExcelに5つのクエリをExcelにエクスポートしています。最終的に、最初のシートを強調したいときは、私にエラーが返されません:1004Excelへのアクセスエクスポート
<code>
'Once the loop ends
xlWorkbook.Sheets("xlsheet1").Select
xlSheet.Range("A3").Select
</Code>
But when I select the last sheet which is by default highlighted I don't get the error.
<code>
'Once the loop ends
xlWorkbook.Sheets("xlsheet5").Select
xlSheet.Range("A3").Select
</Code>
Can someone help me with this.
Thanks in Advance.
毎回新しいブックを作成しています。 5番目のブックには、最初のブックからのシートがありません。 'xlWorkbook(1〜5)'の配列を実行できます。 – user3819867
また、 'xlWorkbook.WorkSheets'を使用してください。 – Gustav