Hello All,
I've got a bit of code that when you click on a button, it inserts a new row below with a unique ID number. There are a series of button down the list as they indicate a new section in the list and a button adds a new row to that section.
The problem I have is that when I apply a...
Hello all,
This is probably a very simple question but many times I have posted code and i loose all the formatting.
How do I keep the VBA format when posting here?
Regards,
Gumbles
Hi there,
I am using the camera tool to display a group of cells from one workbook to another. The tool works great when its in the same workbook as ive used it many times before.
The problem im having is that when I have the camera tool referreing to another workbook it doesnt update. Even...
Good day to you bobhc,
Does this come in the form of a dropdown button? as this would be ideal.
If you could indicate how to apply this one column filter on a table, I'd be most gratful.
Gumbles
Hello there,
Im trying to apply a filter to only ONE column in my table.
I know this is possible with normal columns by selecting the column before apply the filter but cant seem to apply this method on my table?
Is this possible?
Cheers,
Gumbles
Hi Narayan,
Sorry but could you upload the file again as it doesn't seem to want to download. Ive been trying over the weekend but with no luck.
Thanks,
Gumbles.
Hi Narayan,
Apologies as I must have uploaded an older version. But the layout is exactly the same.
The shapes are overlayed on the questions in column A:A (using snap to grid) and made invisible so i must have overlooked this when uploading the wrong version.(DOH!)
The code on my current...
Apologies for the delay,
This is the basic layout of my table.
https://www.dropbox.com/s/377v67ncock1m9p/Issue_List.xlsx
Also i have been trying your method of using f9 and going through the code with f8 and the error is always on the "selection.listobject.listrow.add()" line.
Gumbles.
Narayan,
Ill upload a version when I get home as I cannot access dropbox or speedyshare from work, the buggers.
Just as a quick check:
My Table is A3:K33
Shapes are in A3:A33
ID number = B3:B33
Regards,
Gumbles
Narayan,
Im getting a debug error on this line:
.ListObject.ListRows.Add (Ro)
I might be very wrong here, but when I was playing with the code before i could never get the fucntion "Activecell" to work. Not sure if this might mean something to you.
Really appreciated!
Gumbles
Narayan,
That code doesnt seem to be working in my table. I get a debug error.
Is it possible that because it in a table it needs to be selected as one? so perhaps the code needs to contain: ListObject.ListRows?
and thanks for the help.
Gumbles
Hi Narayan,
It does work but not completely, The 1st bit of formula inserts a row but it's an entire row (accross the whole worksheet), I only need a row in the table. As there is other information to the left of the table.
I hope this is clearer.
Gumbles.
Ok So i have used your code and tried to bend it to my will.
This is what I have:
Sub insert_row()
Ro = ActiveSheet.Shapes(Application.Caller).TopLeftCell.Offset(1, 0).Row
Rows(Ro).Insert Shift:=xlShiftUp
Rows(Ro).Hidden = False
End Sub
but this inserts a row to the whole worksheet...
Hello Narayan,
Thankyou once again for helping me!
Im currently trying to piece togethe all the bits of code I have to perform the required task and this has helped hugely as im working it out through recorded macros lol.
Cheers,
Gumbles.
I have this which helps identify the cells address. Not sure if it can be made generic to any shape though.
Worksheets("Sheet Name").Shapes("Rectangle 1").TopLeftCell.Address
Still trying.
Gumbles
Hi there,
I am trying to create a peice of code that is generic for all shapes on a particular worksheet, so any shapes on the worksheet will use it when clicked.
There is a list of headings and a shape is overlayed on each heading. WHen the user clicks on the shape it goes one row down from...
Brilliant!
Thanks Very much Hui.
I have one question though. The data in $B:$2 will change when the week changes and this will happen before the macros are enabled as They have to be turned on. Will this affect the operation of the code or should it work regardless?
Gumbles.
Hello all,
I have a small recorded macro that copies one list of cells (Week 1) to another list (Week 2) then deletes the first list.
I would like to make this macro run automatically when the cell L2 changes. They are the current week and the next week so this needs to happen each week...
Thanks Narayan,
A very simple and elegant solution, Ill give this a try when Im home.
Do you know if its possible to apply this macro to a shape? as Ideally I would like to make the button invisible.
Gumbles