Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88835

Dealing with a worksheet name with spaces

$
0
0

I'm able to set a worksheet name without spaces and manipulate it with out issue. However, everything I've tried with spaces doesn't work.

Dim myBook As Workbook
Dim myWorksheet As Worksheet
Set myBook = ActiveWorkbook
Set myWorksheet = myBook.Sheets("my worksheet name")

I've tried setting single quotes around it alone.


Viewing all articles
Browse latest Browse all 88835


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>