What does "me" do in VBA

Hlatigo

Well-known Member
Joined
Jun 3, 2002
Messages
677
I have the following code that is activated when a command button is clicked. I am not too sure what is being accomlished here. Maybe because I thought that me was used for the current form, but the current form does not have anything in the text boxes when it appears. Can anyone help? thanks so very much!!! :biggrin:



Private Sub cmdUpdateValue_Click()
Dim fmodal As New frmParameter


strCurrentfile = Me.txtCurrentLink.Text
strNewfile = Me.txtNewLink.Text
strLinkedDir = Me.txtLinkedDir.Text
strCurrentDIR = Me.txtCurrentDIR.Text
strNewDIR = Me.txtNewDIR.Text

fmodal.Show vbModal

End Sub
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Me does indeed refer to the object containing the code. It's not necessary.

Maybe you have your assignment expressions the wrong way round, eg:

txtCurrentLink.Text = strCurrentfile
 
Upvote 0
There are a few text boxes embedded within the excel sheet itself and i believe all it is doing is allowing the user to mannually update or change the folder date that the file is located in but I am not to sure. This isn't mine, I was just asked to update it with a additional process.
 
Upvote 0

Forum statistics

Threads
1,203,082
Messages
6,053,417
Members
444,662
Latest member
AaronPMH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top