![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: rejdus@hotmail.com
Posts: 18
|
I have an invoice spreadsheet.
There is a column to enter data,invoice no.,type,contractor etc. There is also column with heading WorkDoneAt andnext column to it is named WorkDetails. What i am looking for is that instead of typing what job was done in a rows like 1.Construct structural opening and other works as agreed. 2.Construct structural opening and other works as agreed.etc etc. I decided too put that into comment and the see it when required so it will take less place. What i need now is to create a macro with a button attached to it which will take me through tthat process with another invoices below. I am not sure if this is possible,if yes could any1 help me.. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Sure it is possible, there have been lots of comments questions on this board. Try the following link (there are more):
http://www.mrexcel.com/board/viewtop...c=4122&forum=2
__________________
Kind regards, Al Chara |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi Mayk,
It is quite easy to create cell comments in a macro. Unfortunately I don't understand your question well enough to get specific in how to do this. I'm not sure whether you want to have a button which pops up a userform that asks you to enter or select from a list of possible job descriptions, which it would then put into a comment. Or do you want to have a macro that takes job description columns from past worksheets and convert them into a comments format rather than a cell format for the job descriptions?
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
Hi
Ill be blunt ill never remember my private message and email is so heavy i track less work sorry, email me on my profile i have sone code you can attach to a bitton and it will add comment ready to type message in and so on, in the actice cell vey cool ... BUT please can i ask remind me to post on this feed so ever one can see and use my code, ill forget. Chris D sorry to ask you know how it is for me, we can hardley speak on the phone these days, BUG me and ill send the code and get it on this feed betweeen us its simple stuff i wrote.. others will love it its sweet.. Cheersnchris ill forget or never get it sorted, i feel others can use this one a big thats for everone.
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
Chris
To ...co.uk please noy Jack acct ive 19 today to sort as you know i answer everone who emails me regardless... its all about help..
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#6 |
|
New Member
Join Date: Mar 2002
Location: rejdus@hotmail.com
Posts: 18
|
DAMON
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Hi Mayk, It is quite easy to create cell comments in a macro. Unfortunately I don't understand your question well enough to get specific in how to do this. I'm not sure whether you want to have a button which pops up a userform that asks you to enter or select from a list of possible job descriptions, which it would then put into a comment. Or do you want to have a macro that takes job description columns from past worksheets and convert them into a comments format rather than a cell format for the job descriptions? _________________ Keep Excelling. Damon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Damon wot i need is a macro code which i could attach to a button which would do following work. after i type all the details in my invoice like DATA, CONTRACTOR,TYPE OF CONTRACTOR,TOTAL,TAX,TOTAL-TAX,ETC I have last column named JOBDETAILS. Instead of typing the details on the worksheet i decided to put it in the comments box. However this is meant to be a programme so user can make other comment box available in the easiest way as possible. And wot ui need is macro which would open automatically the comment box. eg. I4 is a column with heading started JobDetails. Below are empty cells but when u point mouse at I5 it will show the details of the job in a comment box. i wont excel to open that automatically to enter new details in new invoices. hope sound better. sorry if too long. if cant help dat is okay. thank u for interest being show anyway |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi again MayK,
Here is some code that I think does what you want. This code is set up to work only with cells in column 2 (column B), but it should be obvious how to change that to work in the column you are interested in. It is actually quite easy to restrict it to any particular range or ranges of cells. Just put this code into the worksheet's event code module. To do this, right-click on the worksheet's tab, select View Code, and paste the code into the VBE code pane that appears. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static LastComment As Comment If Not LastComment Is Nothing Then LastComment.Visible = False If Target.Column = 2 Then On Error GoTo NoComment Target.Comment.Visible = True Set LastComment = Target.Comment Application.SendKeys "%IE~" Exit Sub NoComment: 'add comment and open for editing Target.AddComment.Visible = True Set LastComment = Target.Comment Application.SendKeys "%IE~" End If End Sub
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|