ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User form to comments (https://www.excelbanter.com/excel-programming/373089-user-form-comments.html)

ewagz

User form to comments
 
I have one that's way out of my league:

I would like to first make a user form that activates when shortcut (ctrl+x)
is used on a cell. This would then allow the user to fill in the data for
name, CC#, Exp date, the date the data was entered, phone #, TOA (time and
date), # of days.

So here's the hitch, I need the userform to then enter the data into
comments for the cell that the shortcut key was used on. So in the end the
cell has the info of the userform in comments and the user can view the data
by resting the mouse over the comments red indicator.

Is this possible??

Thanks to all in advance for any help in the matter!


--
EW - Analyst

Tom Ogilvy

User form to comments
 
Here is information on userforms:

http://j-walk.com/ss/excel/tips/tip84.htm

See this tutorial here
http://www.dicks-blog.com/excel/2004...g_userfor.html

XL97: How to Use a UserForm for Entering Data (Q161514)
http://support.microsoft.com/?id=161514

XL2000: How to Use a UserForm for Entering Data (Q213749)
http://support.microsoft.com/?id=213749


Here are some other sources of information:

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.


http://support.microsoft.com/?id=168067
File Title: Microsoft(R) Visual Basic(R) for Applications Examples for
Controlling UserForms in Microsoft Excel 97
File Name: WE1163.EXE
File Size: 161742 bytes
File Date: 05/08/97
Keywords: kbfile
Description: This Application Note is an introduction to manipulating
UserForms in Microsoft Excel 97. It includes examples and Microsoft Visual
Basic for Applications macros that show you how to take advantage of the
capabilities of UserForms and use each of the ActiveX controls that are
available for UserForms

Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en...FormsPartI.asp
Part II
http://msdn.microsoft.com/library/en...ormsPartII.asp


you can assign a shortcut key by running a macro that executes the OnKey
command. See Excel VBA help.

You can see how to update/create a comment by turning on the macro recorder
and creating the comment manually one time. Then turn off the macro recorder
and look at the code. .

ActiveCell can be used to determine what cell was selected when you did
Ctrl+g

--
Regards,
Tom Ogilvy


"ewagz" wrote in message
...
I have one that's way out of my league:

I would like to first make a user form that activates when shortcut
(ctrl+x)
is used on a cell. This would then allow the user to fill in the data for
name, CC#, Exp date, the date the data was entered, phone #, TOA (time and
date), # of days.

So here's the hitch, I need the userform to then enter the data into
comments for the cell that the shortcut key was used on. So in the end
the
cell has the info of the userform in comments and the user can view the
data
by resting the mouse over the comments red indicator.

Is this possible??

Thanks to all in advance for any help in the matter!


--
EW - Analyst




Gary Keramidas

User form to comments
 
test this in a blank worksheet with a userforn that has 4 textboxes and 1
commandbutton: you can assign a macro that uses control -x to show the form
(userform.show)

Option Explicit

Private Sub CommandButton1_Click()
Dim cmt As String, i As Long
For i = 1 To 4
cmt = Me.Controls("textbox" & i).Value & " " & cmt

Next
ActiveCell.AddComment cmt
End Sub


--


Gary


"ewagz" wrote in message
...
I have one that's way out of my league:

I would like to first make a user form that activates when shortcut (ctrl+x)
is used on a cell. This would then allow the user to fill in the data for
name, CC#, Exp date, the date the data was entered, phone #, TOA (time and
date), # of days.

So here's the hitch, I need the userform to then enter the data into
comments for the cell that the shortcut key was used on. So in the end the
cell has the info of the userform in comments and the user can view the data
by resting the mouse over the comments red indicator.

Is this possible??

Thanks to all in advance for any help in the matter!


--
EW - Analyst





All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com