Pete Straman S via OfficeKB.com
Guest
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
Bookmarks