Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 09-09-2013, 01:16 AM
SaneMan SaneMan is offline Macro to change cell references Windows 7 64bit Macro to change cell references Office 2007
Novice
Macro to change cell references
 
Join Date: Jan 2011
Posts: 20
SaneMan is on a distinguished road
Default

Thanks Bob!

The external sheet references are as follows:

Quote:
='H:\Desktop\[CP Final.xls]c1a'!A20
I tried inserting the code you provided into my macro and it when I ran it a dialogue box comes up saying "Object required". Here's what my macro looks like:

Quote:
Sub newmacro2()
Workbooks.Open ("H:\Desktop\Z1 assessment for CP data_v3.xlsx")
Range("A1:BF85").Select

vf = co.Formula
co.Formula = Left(vf, pr - 1) & Mid(vf, pr) + 2

ThisFile = Range("D1").Value

ActiveWorkbook.SaveAs Filename:="1 " + ThisFile
ActiveWorkbook.Close
End Sub
I didn't think it was likely it'd work after just slotting it in, but as I'm fairly new to this I couldn't really tell what your macro was doing.

Thanks for the help with this. It's much appreciated. Do you know what I should do to make your code work with the rest of my macro?

Last edited by SaneMan; 09-09-2013 at 07:15 AM.
Reply With Quote
 

Tags
cell references, macro, vba excel



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to change cell references Creating a Macro to change the shading of a cell Triscia Word VBA 3 01-30-2013 04:18 PM
Change formula cell range based on cell value Scoth Excel 4 10-25-2012 07:51 AM
Formula that references cell with text in different workbook no1texan Excel 3 07-17-2012 05:58 AM
Detect a cell has un-approved change or not? LongTTH Excel Programming 1 05-20-2012 02:22 AM
Macro to change cell references how to change number in cell ubns Excel 5 05-14-2012 04:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft