macro / vba assistance

Rameses

Board Regular
Joined
Mar 3, 2010
Messages
137
:confused:

Dear all

Worksheet 1 is a data set

Worksheet 2 is a form template with cells to be filled from row 2 of worksheet 1

Once that is filled in I want to be able to save that and open a new worksheet with the form template to fill in row 3 of worksheet 1 (this can all be saved in the same workbook)

I need a macro but dont know where to start

any assistance gratefully received

rameses
 
I tried adding the following

Range("B1").Interior.ColorIndex = dSht.Range("A1").Interior.ColorIndex

obviously changing the cell nos to match mine but still no luck

anyone have an idea pleaaase..?
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Still not sure of how to go about it in the code

I wonder will

/*Interior.ColorIndex

also work with mailmerge???
 
Upvote 0
are there any mvps who can help with this request? as i have now searched high and low, far and wide and am stumped ....quite seriously

anything, tips or whatever to help me work with it would be gratefully received!!!!
 
Upvote 0
vba and cell colour

hi guys

anyone willing to help as I am going balder by the minute...???

Rameses
 
Upvote 0
Re: vba and cell colour

1) Mail Merge won't be taking cell formatting unless you're really hot at VBA. Mail merge takes in values from a data set and inserts into a form that has its own formatting in place.

2) The syntax I've given works for me, so no idea why you're seeing something different. If posted a sample workbook somewhere we could look at together, this would be simpler. You can use the link in my signature to contact me directly.

Meanwhile, we can try reversing the syntax to a more brutish copy/paste:
Code:
        With ActiveSheet                                'fill out the form
            'edit these rows to fill out your form, add more as needed
            .Name = dSht.Range("A" & Rw)
            dSht.Range("A" & Rw).Copy .Range("C2")
            dSht.Range("B" & Rw).Copy .Range("F2")
            dSht.Range("C" & Rw).Copy .Range("C6")
            dSht.Range("D" & Rw).Copy .Range("C5")
            dSht.Range("F" & Rw, "I" & Rw).Copy .Range("B12:E12")
            dSht.Range("K" & Rw, "N" & Rw).Copy .Range("F12:I12")
            dSht.Range("P" & Rw, "S" & Rw).Coy .Range("J12:M12")
            dSht.Range("U" & Rw, "X" & Rw).Copy .Range("B16:E16")
            dSht.Range("Z" & Rw).Copy .Range("F16")
            dSht.Range("AA" & Rw, "AC" & Rw).Copy .Range("G16:I16")
            dSht.Range("AE" & Rw, "AH" & Rw).Copy .Range("J16:M16")
            dSht.Range("AJ" & Rw, "AM" & Rw).Copy .Range("B20:E20")
            dSht.Range("AO" & Rw, "AR" & Rw).Copy .Range("F20:I20")
            dSht.Range("AT" & Rw, "AW" & Rw).Copy .Range("J20:M20")
        End With
 
Upvote 0

Forum statistics

Threads
1,216,419
Messages
6,130,515
Members
449,585
Latest member
kennysmith1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top