Click here to Skip to main content
15,923,164 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Stack Overflow when adding controls across threads. Pin
m@u30-Jan-08 23:48
m@u30-Jan-08 23:48 
GeneralRe: Stack Overflow when adding controls across threads. Pin
Chinners31-Jan-08 0:16
Chinners31-Jan-08 0:16 
GeneralRe: Stack Overflow when adding controls across threads. Pin
m@u31-Jan-08 0:22
m@u31-Jan-08 0:22 
AnswerRe: Stack Overflow when adding controls across threads. Pin
Chinners31-Jan-08 0:31
Chinners31-Jan-08 0:31 
GeneralProblem with Excel Sheet name when importing using oledb Pin
RichardBerry30-Jan-08 21:28
RichardBerry30-Jan-08 21:28 
GeneralRe: Problem with Excel Sheet name when importing using oledb Pin
Johan Hakkesteegt31-Jan-08 0:47
Johan Hakkesteegt31-Jan-08 0:47 
GeneralRe: Problem with Excel Sheet name when importing using oledb Pin
RichardBerry31-Jan-08 3:58
RichardBerry31-Jan-08 3:58 
GeneralRe: Problem with Excel Sheet name when importing using oledb Pin
Johan Hakkesteegt31-Jan-08 20:30
Johan Hakkesteegt31-Jan-08 20:30 
The problem with Excel programming (in my experience) is that any code is rather sensitive to (MS Excel) version differences.

I don't know if there is any kind of special escape character you could use, but one thing you can try is the "add quotes till it works" method. Something like this:
"SELECT * FROM ['" & mysheetName- & "'$.F1]"
next "SELECT * FROM [" & "'" & " & mysheetName- & " & "'" & "$.F1]"
or "SELECT * FROM [''" & mysheetName- "''$.F1]"
next "SELECT * FROM ['''" & mysheetName- "'''$.F1]"
etc. (and you can try variations of the location of the quotes)

One other option that came to mind was to try and use the sheets index instead of its name. I found this article that may be helpful: http://www.ozgrid.com/VBA/excel-vba-sheet-names.htm[^]

and a third option that came to mind is to first programmatically change the sheet name before you run the query against it (a bit clumsy, but once it runs, who cares right?).
And in conjunction to this idea: the sheet (name) seems to also get created by some sort of automatic process. Do you have access to this process?

My advice is free, and you may get what you paid for.

GeneralRe: Problem with Excel Sheet name when importing using oledb Pin
RichardBerry1-Feb-08 0:50
RichardBerry1-Feb-08 0:50 
GeneralDeployment Problem Pin
SamRST30-Jan-08 21:21
SamRST30-Jan-08 21:21 
GeneralDay of the week combinations. [modified] Pin
Absenm30-Jan-08 20:45
Absenm30-Jan-08 20:45 
GeneralRe: Day of the week combinations. Pin
Mycroft Holmes30-Jan-08 21:55
professionalMycroft Holmes30-Jan-08 21:55 
QuestionDatagridview default style getting changed changes Pin
nishkarsh_k30-Jan-08 20:36
nishkarsh_k30-Jan-08 20:36 
GeneralRe: Datagridview default style getting changed changes Pin
Dave Kreskowiak31-Jan-08 4:46
mveDave Kreskowiak31-Jan-08 4:46 
GeneralRe: Datagridview default style getting changed changes Pin
nishkarsh_k31-Jan-08 19:48
nishkarsh_k31-Jan-08 19:48 
GeneralLock Folder Pin
Kumaran21cen30-Jan-08 19:43
Kumaran21cen30-Jan-08 19:43 
GeneralRe: Lock Folder Pin
Mycroft Holmes30-Jan-08 22:00
professionalMycroft Holmes30-Jan-08 22:00 
GeneralRe: Lock Folder Pin
Steven J Jowett30-Jan-08 23:28
Steven J Jowett30-Jan-08 23:28 
GeneralRe: Lock Folder Pin
Dave Kreskowiak31-Jan-08 4:45
mveDave Kreskowiak31-Jan-08 4:45 
Generalinstantiating object returns nothing Pin
rotsey30-Jan-08 18:01
rotsey30-Jan-08 18:01 
GeneralRe: instantiating object returns nothing Pin
Justin Perez31-Jan-08 3:08
Justin Perez31-Jan-08 3:08 
QuestionHow to use Adodc In Vb.net Pin
ejaz_pk30-Jan-08 8:02
ejaz_pk30-Jan-08 8:02 
GeneralRe: How to use Adodc In Vb.net Pin
Mycroft Holmes30-Jan-08 13:18
professionalMycroft Holmes30-Jan-08 13:18 
QuestionRe: How to use Adodc In Vb.net Pin
ejaz_pk31-Jan-08 1:29
ejaz_pk31-Jan-08 1:29 
GeneralRe: How to use Adodc In Vb.net Pin
Mycroft Holmes31-Jan-08 13:12
professionalMycroft Holmes31-Jan-08 13:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.