LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Must add 1 to InputBox entry for code to work properly

On Wednesday, March 25, 2015 at 11:59:03 PM UTC-7, Claus Busch wrote:
Hi Howard,

Am Thu, 26 Mar 2015 07:55:00 +0100 schrieb Claus Busch:

If lRow = 1 Then
Set wkRng = .Rows(f.Row & ":" & l.Row)
wkRng.Copy Sheets("Master").Range("A1")
Else
Set wkRng = .Rows(f.Row & ":" & l.Row)
wkRng.Copy Sheets("Master").Cells(lRow + 2, 1)
End If


sorry, forgot the headers:

If lRow = 1 Then
Set wkRng = .Rows(f.Row & ":" & l.Row)
Set myRng = Application.Union(.Rows(1), wkRng)
myRng.Copy Sheets("Master").Range("A1")
Else
Set wkRng = .Rows(f.Row & ":" & l.Row)
Set myRng = Application.Union(.Rows(1), wkRng)
myRng.Copy Sheets("Master").Cells(lRow + 2, 1)
End If


Regards
Claus B.



Oh boy, I would have never sorted that out.

Works mighty fine.

Thanks again.

Howard
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to save Word-document do not work properly jkrons Excel Programming 3 May 6th 10 08:44 PM
How to use InputBox for passphrase entry? Joe User[_2_] Excel Programming 4 February 8th 10 03:36 PM
Validate InputBox entry davidm Excel Programming 0 August 31st 05 03:03 AM
Msgbox if Inputbox entry contains character Steph[_3_] Excel Programming 1 June 23rd 05 06:02 PM
Can't get code to work properly. Please Help! sparky3883[_8_] Excel Programming 2 April 15th 04 01:55 PM


All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"