Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Merge cells with C/C++?

Please ignore - this was a response to another post.

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
Try it this way:

Private Sub ComboBox1_Change()
'this works
Dim iRow As Integer
iRow = ComboBox1.ListIndex + 1
UserForm1.TextBox1.Value = Cells(iRow, 1).Value
UserForm1.TextBox2.Value = Cells(iRow, 2).Value
UserForm1.TextBox3.Value = Cells(iRow, 3).Value
UserForm1.TextBox4.Value = Cells(iRow, 4).Value
UserForm1.TextBox5.Value = Cells(iRow, 5).Value

End Sub

Private Sub CommandButton1_Click()
'this does not work, only the first gets updated
Dim iRow As Integer
iRow = ComboBox1.ListIndex + 1
Sheets("sheet1").Cells(iRow, 1).Value = UserForm1.TextBox1.Value
'none of these below update the sheet
Sheets("sheet1").Cells(iRow, 2).Value = UserForm1.TextBox2.Value
Sheets("sheet1").Cells(iRow, 3).Value = UserForm1.TextBox3.Value
Sheets("sheet1").Cells(iRow, 4).Value = UserForm1.TextBox4.Value
Sheets("sheet1").Cells(iRow, 5).Value = UserForm1.TextBox5.Value
ComboBox1.List = sheets("Sheet1").Range("a1:e40").Value
End Sub

Private Sub CommandButton2_Click()
'just a cancel button to exit out
Unload UserForm1
End Sub

Private Sub UserForm_Initialize()
ComboBox1.ColumnCount = 2
ComboBox1.List = sheets("Sheet1").Range("a1:e40").Value
End Sub

--
Regards,
Tom Ogilvy


"Jerry" wrote in message
...
I have been in a process of rewriting all my VBA code to C++ to create a

XLL
file. for increased speed and security. The problem I have come across

is
the
process of merging cells together. Can someone direct me in the right
direction on how to do this. This is not a COM it is a XLL file and

using
Excel4 for macro calls. As there is very little information out there on
working on things like this I have been unable to figure out how to do

this.

If anyone knows how to do this or has a sample they could put up it

would
be
greatly appreciated. Thanks in advance





Reply
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
Automatically merge mulitiple cells to one cells Edward Wang Excel Worksheet Functions 5 September 15th 09 07:56 PM
how do I merge cells into one then delete the original cells? LLR Excel Worksheet Functions 2 March 7th 08 10:59 PM
How do I merge cells in Excel, like just 2 cells to make one big . chattacat Excel Discussion (Misc queries) 2 January 19th 05 04:25 PM
fill cells, merge cells porkie[_4_] Excel Programming 1 September 23rd 04 04:21 AM
fill cells, merge cells porkie[_2_] Excel Programming 1 September 21st 04 01:49 PM


All times are GMT +1. The time now is 08:17 PM.

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"