LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default VBA & Excel: Concatenation problem

Here's code I have placed in a command button on an Excel 2003
spreadsheet. I'm getting the last non-empty row on a sheet so I can use
it to set a range. I am so far unable, however, to determine how to
concatenate this numeric value as part of the range expression below.
I'd be very grateful if someone could oint out how to do this. Thanks!


Henry
DPM Mellon

----------------------------------------------------------------------

Private Sub cmdShow_Form_Click()

Dim intLastRow As Integer
Dim strEndRange As String

ThisWorkbook.Sheets(3).Activate
intLastRow = ActiveSheet.Range("A65536").End(xlUp).Row

' ThisWorkbook.DeleteEmptyRows Range("C2:F65536")
strEndRange = Trim(Str(intLastRow))

' -----------------------------
' This is the problematic line
' -----------------------------
UserForm1.lstCLID.RowSource = ThisWorkbook.Sheets(3).Range("C2:F" & _
strEndRange)"

UserForm1.Show

End Sub
 
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
Excel concatenation VB Code Excel Worksheet Functions 2 January 7th 09 07:02 PM
Concatenation in Excel Muthalaly Excel Worksheet Functions 6 June 24th 08 03:34 PM
Concatenation in Excel 2003 lireland Excel Worksheet Functions 7 November 9th 07 12:40 AM
Concatenation Problem / VBA ? carl Excel Worksheet Functions 5 October 26th 05 07:35 PM
excel save AND concatenation problem Greg85374 Excel Programming 5 February 15th 04 07:11 PM


All times are GMT +1. The time now is 09:43 PM.

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

About Us

"It's about Microsoft Excel"