Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Option button object proeprties or object not found in vba

I am using a radio button in an excel spread sheet that downloads data from
SQL Server to the spread sheet. Sometimes I down load from my local server on
my laptop and some times from a remote server.
I want to use the radio button to distinquish which connection string to use
without having to go in and change my code everytime.

obLocalServer is what I name the option button. I get the "variable not
defined" error

Sub Select_Server()

If (obLocalServer.Value = True) Then
ConnectionString = _
"Provider=sqloledb;Integrated Security=SSPI;Persist Security
Info=False;" & _
"Data Source=CLTL-663P351;" & _
"XXXXXXXX;"
Else
the other server
End If
End Sub

--
C. Pete Straman


Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200508/1
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 Label Options - Forms Object vs Control Box Object Awrex Excel Discussion (Misc queries) 3 July 17th 09 07:10 PM
Excel found unreadable content in 'stock.chart.object.xlsm' jcmjcm Charts and Charting in Excel 0 May 21st 09 09:14 PM
Confusion about how the Window object fits into the Excel object model Josh Sale Excel Programming 11 April 15th 05 06:08 PM
Object error on an Option Button Garry[_7_] Excel Programming 2 October 1st 04 07:33 PM
WScript object not found (???) Tom Ogilvy Excel Programming 1 July 10th 03 10:59 PM


All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"