cancel
Showing results for 
Search instead for 
Did you mean: 

Difference of VBA Scripting between 'ctxt' and 'txt'

0 Kudos

Hi everyone!

I recorded a script and I can run it on my computer. I can also run it on the computer of some of my colleagues. But it does not run on all computers. And as I would like to offer it to all colleagues, it certainly should work everywhere.

When I did the scripting it recorded a certain field like this '.../ctxt/...' and this works on my computer. As said this does not work on some of the other computers. But when I change i to '.../txt/...' - only missing the 'c' - it works on the other computers. But this version again does not work on mine.

I already learned that the ctxt is for combobox - is that correct? And is there any possibility to have one version for all computers?

I also found something about high speed and low speed connection - but this is the same for all computers in my group. So this cannot be the point.

Thanks for all answers!

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_schnell
Active Contributor
0 Kudos

Hello Kerstin,

welcome in the SAP Community.

Yes, ctxt is a text field and if the cursor is set into it a combo box button is displayed to the right of the text field. Pressing this button is equivalent to pressing the F4 key. The button is not represented in the scripting object model as a separate object; it is considered to be part of the text field.

To solve your problem you can try this:

On Error Resume Next
session.findById(".../ctxt/...")
If Err Then
  session.findById(".../txt/...")
End If
On Error GoTo 0

Best regards
Stefan