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: 1
Default Linkedcell Problems...

Hi everyone,

I'm trying to copy a range of cells and activex comboboxes positioned
over them, from one sheet ("template") to another sheet ("Quote").

The following code
1) copies the cells and their bordering/formatting etc,
2) attempts to set the linkedcell values of each combobox to the new
value required on the Quote Sheet
3) copies the comboboxes and places them over the top of their
'would-be' linked-cells
4) resets the print area.

I can't get the second stage, above, to work correctly.

I'm still learning VB so if you could explain any solutions you can
provide I'd be grateful!


----------------------------------------------------------
Sub addrow()

Sheets("Template").Range("A1:G6").Copy
With Sheets("Quote").Range("insertpoint")
..Insert Shift:=xlDown
..Offset(-5, 0).Value = .Offset(-11, 0).Value + 1
End With

Sheets("Template").Activate
ActiveSheet.ComboBox1.LinkedCell = "Offset(insertpoint,-6,1)"
ActiveSheet.ComboBox2.LinkedCell = "Offset(insertpoint,-5,1)"
ActiveSheet.ComboBox3.LinkedCell = "Offset(insertpoint,-4,1)"
ActiveSheet.ComboBox4.LinkedCell = "Offset(insertpoint,-3,1)"
ActiveSheet.ComboBox5.LinkedCell = "Offset(insertpoint,-2,1)"
ActiveSheet.ComboBox6.LinkedCell = "Offset(insertpoint,-1,1)"

ActiveSheet.Shapes.Range(Array("ComboBox1, ComboBox2, ComboBox3,
ComboBox4, ComboBox5, ComboBox6")).Select
Selection.Copy
Sheets("Quote").Select
Range("Offset(insertpoint, -6, 1)").Select
ActiveSheet.Paste

Sheets("Quote").PageSetup.PrintArea = "$A$1offset(insertpoint2,0,6))"
End Sub


---
Message posted from http://www.ExcelForum.com/

 
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
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
ActiveX Combobox and LinkedCell aqualibra Excel Worksheet Functions 2 August 21st 08 08:36 PM
ComboxBox with Dynamically Defined Source, and LinkedCell error GlennUK Excel Discussion (Misc queries) 1 June 4th 08 03:11 PM
Combo Box "LinkedCell" option Patty via OfficeKB.com Excel Discussion (Misc queries) 0 August 2nd 05 10:01 PM
Linkedcell protection problem Karin New Users to Excel 2 June 24th 05 12:03 AM


All times are GMT +1. The time now is 01:31 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"