Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2016, 07:11 PM
carlandtina02 carlandtina02 is offline BeforeDoubleClick send row to sheet2 Windows XP BeforeDoubleClick send row to sheet2 Office 2010 64bit
Novice
BeforeDoubleClick send row to sheet2
 
Join Date: Mar 2016
Posts: 11
carlandtina02 is on a distinguished road
Default BeforeDoubleClick send row to sheet2

Hi Guys,



I have some code that i'm having bother with and could really do with some help please, this is what it does:

In sheet 1 I double click on the row of column B and that then sends that row to B33 on sheet 2, or if you click on the row of column C it will send the same row to B61 on sheet 2.

The rows on sheet2 are hidden and unhide one by one when the row/s above get populated.

The problem is, i have merged columns B,C & D and the code has stopped working, also i don't understand how the code references where the "copy row" starts at?

Any help would be much appreciated



Thanks
Attached Files
File Type: xlsm BDC SAMPLE.xlsm (209.0 KB, 10 views)
Reply With Quote
  #2  
Old 03-25-2016, 03:58 AM
Philb1 Philb1 is offline BeforeDoubleClick send row to sheet2 Windows 10 BeforeDoubleClick send row to sheet2 Office 2010 32bit
Advanced Beginner
 
Join Date: Feb 2016
Location: Auckland
Posts: 43
Philb1 is on a distinguished road
Default

Hi Carl

I had a play and see there's merged cells everywhere & as soon as I saw that I stopped.
It's best to avoid merged cells like the plague, as merged cells & VBA don't get on very well.
The other thing is I think you've changed the layout of sheet 2, or at least enough for the VBA code to not work properly. If you can, settle on how you want it laid out & then do the coding. Coding doesn't compensate for any changes like cell formulas do.

The finding the row is done by looking straight up from cell E58 to the first row in column E that has something in it, the Offset(1,0) comes down 1 row from the row with something in. Hope that makes sense lol
Reply With Quote
  #3  
Old 03-25-2016, 04:01 AM
Philb1 Philb1 is offline BeforeDoubleClick send row to sheet2 Windows 10 BeforeDoubleClick send row to sheet2 Office 2010 32bit
Advanced Beginner
 
Join Date: Feb 2016
Location: Auckland
Posts: 43
Philb1 is on a distinguished road
Default

Instead of merging cells, use Centre Across Selection in the Format Cells / Alignment / Horizontal menu. It gives the same effect without the grief.
Reply With Quote
  #4  
Old 03-25-2016, 03:46 PM
carlandtina02 carlandtina02 is offline BeforeDoubleClick send row to sheet2 Windows XP BeforeDoubleClick send row to sheet2 Office 2010 64bit
Novice
BeforeDoubleClick send row to sheet2
 
Join Date: Mar 2016
Posts: 11
carlandtina02 is on a distinguished road
Default

Hi Phil,

Thanks for the tip, things are starting to become clearer now lol.

The code worked well until i added another two columns into sheet 2 so, I had a bit play with the offset but can only get the values to go into columns D & E instead of B & E.

I tried what you suggested above but it didnt give the result unfortunately

Carl
Reply With Quote
  #5  
Old 03-25-2016, 07:03 PM
Philb1 Philb1 is offline BeforeDoubleClick send row to sheet2 Windows 10 BeforeDoubleClick send row to sheet2 Office 2010 32bit
Advanced Beginner
 
Join Date: Feb 2016
Location: Auckland
Posts: 43
Philb1 is on a distinguished road
Default

I changed things about a bit in the top part of the Parts List sheet code, got things to paste into the right cells & changed the deleting code a bit. I've put notes in the code trying to explain what's happening lol. It works as it is now but the Parts List sheet code doesn't have any error control. That means that if something does go wrong it could go into infinite looping or end without enable events being re-enabled, both of which would be a bit of a pain to the user.
I can see you're trying to learn as much as you can as you go so I won't spoil your fun

Cheers
Attached Files
File Type: xlsm CarlAndTina-BDC SAMPLE-1.xlsm (209.5 KB, 9 views)
Reply With Quote
  #6  
Old 03-26-2016, 03:27 AM
carlandtina02 carlandtina02 is offline BeforeDoubleClick send row to sheet2 Windows XP BeforeDoubleClick send row to sheet2 Office 2010 64bit
Novice
BeforeDoubleClick send row to sheet2
 
Join Date: Mar 2016
Posts: 11
carlandtina02 is on a distinguished road
Default

Phil you're a star!

That works perfectly and the comments are a great help mate, I've been having trouble with that for a while now so you've helped me out alot!

Cheers again
Carl
Reply With Quote
Reply

Tags
vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
On Click do a search of its contents on sheet2 mike12 Excel 11 10-16-2014 04:32 PM
Transferring info from 1column on sheet2 to sheet1 rogcar75 Excel 22 08-26-2014 05:07 PM
split text files to worksheets (sheet1,sheet2,sheet3 soon sheet 25) gsrikanth Excel Programming 1 03-22-2012 11:04 PM
BeforeDoubleClick send row to sheet2 How to merge two cells from sheet1 to one cell in sheet2 in next sheet KIM SOLIS Excel 6 10-30-2011 11:14 PM
BeforeDoubleClick send row to sheet2 Checking ref # status based on sheet2 ref #. aligahk06 Excel 1 04-26-2010 11:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft