![]() |
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 |
All times are GMT +1. The time now is 03:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com