access vba courses - vba formula copying
Request a callback

We'll call during UK business hours

Name:
Number:
0207 987 3777

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » access vba courses - VBA Formula copying

access vba courses - VBA Formula copying

resolvedResolved · Low Priority · Version Standard

Wed 21 Nov 2007, 16:21 replyReply Delegate Rebecca said...

Rebecca has attended:
Excel Advanced course

VBA Formula copying

I am trying to copy formula in VBA along 8 coulmns and 10 rows from the activecell.

The activecell is created from the formula finalrow = Cells(65536, 1).End(xlUp).Row - 80 because I am continully adding lines onto the worksheet and finalcolumns = Cells(8, 255).End(xlToLeft).Column

Instead of copying each line of formula and each column of formula, I woul like to know if there is a quicker way of creating a range. I have tried Range ("finalcolumn:finalrow") but this isn't right.

Can you please help

Many thanks

Becky

For upcoming training course dates see: Pricing & availability

Fri 23 Nov 2007, 15:21 replyReply Trainer Carlos said...

RE: VBA Formula copying

Rebecca

Try using the following to line of code to select the required range:

Range(Cells(StartRowVal,StartColVal), Cells(EndRowVal,EndColVal)).Select

If you are going to be reffering to this range multiple times you could create a variable for it as shown below.

Dim MyRange as Range

Set MyRange = Range(Cells(StartRowVal,StartColVal), Cells(EndRowVal,EndColVal))


Hope this helps

Carlos



 

Access tip:

Design View in Relationship window

Your in the Relationship window and changes are required to be made to a Table's design.

Rather than exiting the Relationship window, if you perform a right-mouse click on the table, it opens that table up in Design view

View all Access hints and tips



Excel training
Course rating:
4.7 stars - based on 18023 reviews
Microsoft Certified Partner Institute of Leadership and Management - Certified Courses Learning and Performance Institute - Accredited Training Provider Security Seal verified by visa, mastercard securecard

Connect with us: Google+ · Facebook · Twitter · LinkedIn · Pinterest

2nd Floor, CA House, 1 Northey Street
Limehouse Basin, London, E14 8BT
United Kingdom