Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA/IDE button being disabled

Status
Not open for further replies.

MSProg

Programmer
Nov 19, 2003
19
US
Hi, all:

I am new to the forum and also to Macola. Any inputs are welcome! Thanks in advance.
I am working on a simple customization of creating a button in the AR form written in VB. Everything works fine on my machine but when I logs on to a different machine, the button is there but nothing responses to the action and the VBA/IDE button is disabled. I am suspecting that the VBA configuration of that remote machine is different from the one set up on my machine. How can I detect that?
Thanks.
 
Under the macola70\vbaprj folder, if you place your code in a directory called "Macola", then all users will get this code. Otherwise, it is user specific. If you do not have a folder for user Jane, then Jane will not have the VBA/Flexibility code, and nothing will happen.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Thank you for your reply.
I know that the system automatically creates the folder with my login name under vbproj as you indicated. However, I am testing my code with the same login so if my login is Jane, that folder Jane is already there and as long as I am logged in as Jane I should be able to access it, right? In fact, I have copy the code to a separate folder called Macola so that everyone can access it; it still doesn't let me access the vb code by pressing ctrl+b or through the VBA/IDE button.
 
To get the code editor on a particular machine you have to install Flexibilty on that machine.
 
So, do I have to install Flexibility on all the machines that run Macola in order to make my code work? I do not need to view the code from any of the remote machines but the problem I am having is that the code doesn't work on the remote machine but only on my local machine.
All I am doing is to add a command button on an existing form and have the following vba code:

Private Sub button1_Click()
On Error GoTo ErrorHandler

Dim row As Integer

'recordset, command and connection variables
Dim cnn As ADODB.Connection
Dim cmd As ADODB.Command
Dim prm As ADODB.Parameter
Dim rst As ADODB.Recordset
Dim strSQL As String, strcnn As String, valuelist As String, cnt As Integer

Set cnn = New ADODB.Connection
strcnn = "Provider='sqloledb';Data Source='SQL';" & _
"Initial Catalog='mydb';Integrated Security='SSPI';"
cnn.Open strcnn

' Open command object with one parameter
Set cmd = New ADODB.Command
cmd.CommandText = "select * From table1"

' Create recordset by executing the command
Set cmd.ActiveConnection = cnn
Set rst = cmd.Execute

If Not rst.EOF Then
cnt = 1

Do Until rst.EOF
valuelist = Trim(rst.Fields(0).Value) & " (" & Trim(rst.Fields(2).Value) & " - " & Trim(rst.Fields(1).Value) & ")"
With lstbox
.AddItem valuelist
End With
cnt = cnt + 1
rst.MoveNext
Loop

End If

cnn.Close
Set rst = Nothing
Set cnn = Nothing


ErrorHandler:
' clean up
If Not rst Is Nothing Then
If rst.State = adStateOpen Then rst.Close
End If
Set rst = Nothing

If Not cnn Is Nothing Then
If cnn.State = adStateOpen Then cnn.Close
End If
Set cnn = Nothing

End Sub


Thanks
 
Do you have the Flex documentation? Setting up clients for Flex is pretty well laid out there.

Are you using the Designer to copy your screensets to the users?
 
I think I can find the Flex documentation. Thanks for the tip.
As for copying the screensets to the users, I haven't done that since I am just start learning Macola. What do you suggest?
Thanks
 
Its easy. Go to System Manager, Designer. Simple little utility pops up. You pick the screen you modified from a menu. You have a little "copy from" user box, type in the name of user you were logged in as when you set up your screen. You'll get a little "copy to" user box. Copy to Macola if you want everyone to have it, otherwise type in user or group name.

Another note: if your users have Office 2000 and up installed you won't have any problem rolling out to them in ADO. If they don't, you'll have to download the correct DLL's and install them.





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top