Macros HELP

  Tk_RiceZ 15:10 13 Dec 03
Locked

i have 3 sheets in excell, groups, standard system and quote, well i recorded the macro in the quote sheet with everything working fine. but on the standard sheet, when i assign it to the macros i've just recorde, the values of whats on the quote sheet appears and on the quote sheet nothing changes.

How can i run the macro on the standard sheet so that the quote sheet changes too.

  VoG II 16:43 13 Dec 03

ALT+F11 to enter the Visual Basic Editor and examine the code that you#ve recorded. You will probablt see that it refers to

Sheets("Standard")

Change each instance of that to

ActiveSheet

(without any quotes) and it should run. If it doesn't, copy the code and paste it here.

  Tk_RiceZ 17:54 13 Dec 03

sorry, didn't make it clear, i've got combo boxes on the quote sheet, but i've put in the figures in the link cell, but when i play the macro in the standard sheet, it appears there! how can i make it that when i press the macro in the stardard sheet, the quote sheet changes also.

  VoG II 17:56 13 Dec 03

You need to edit the macro and either change the sheet reference from

Sheets("Standard")

or

AvtiveSheet

to

Sheets("Quote")

  Tk_RiceZ 17:58 13 Dec 03

let me just give it a try, in visual basic right?

  Tk_RiceZ 17:59 13 Dec 03

ActiveCell.FormulaR1C1 = "7"
Range("C3").Select
ActiveCell.FormulaR1C1 = "5"
Range("C3").Select
ActiveCell.FormulaR1C1 = "14"
Range("C5").Select
ActiveCell.FormulaR1C1 = "4"
Range("C7").Select
ActiveCell.FormulaR1C1 = "5"
Range("C9").Select
ActiveCell.FormulaR1C1 = "5"
Range("C11").Select
ActiveCell.FormulaR1C1 = "5"
Range("C11").Select
ActiveCell.FormulaR1C1 = "6"
Range("C13").Select
ActiveCell.FormulaR1C1 = "5"
Range("C13").Select
ActiveCell.FormulaR1C1 = "4"
Range("C13").Select
ActiveCell.FormulaR1C1 = "5"
Range("C15").Select
ActiveCell.FormulaR1C1 = "65"
Range("C15").Select
ActiveCell.FormulaR1C1 = "6"
Range("C15").Select
ActiveCell.FormulaR1C1 = "7"
Range("C17").Select
ActiveCell.FormulaR1C1 = "7"
Range("C19").Select
ActiveCell.FormulaR1C1 = "3"
Range("C21").Select
ActiveCell.FormulaR1C1 = "3"
Range("G1").Select
ActiveCell.FormulaR1C1 = "4"
Range("G3").Select
ActiveCell.FormulaR1C1 = "4"
Range("G5").Select
ActiveCell.FormulaR1C1 = "5"
Range("F7").Select
ActiveCell.FormulaR1C1 = "TRUE"
Range("F8").Select
ActiveCell.FormulaR1C1 = "TRUE"
Range("F9").Select
ActiveCell.FormulaR1C1 = "TRUE"
Range("F10").Select
ActiveCell.FormulaR1C1 = "TRUE"
Range("F11").Select
ActiveCell.FormulaR1C1 = "TRUE"
Range("F12").Select
ActiveCell.FormulaR1C1 = "TRUE"
Range("F13").Select

  Tk_RiceZ 18:00 13 Dec 03

do i just delete the thing in the " " and change it to quote?

  VoG II 18:04 13 Dec 03

Were you jumping from sheet to sheet whilst recording this macro?

  Tk_RiceZ 18:06 13 Dec 03

nope, i recorded it in the quote sheet, run the macro from there and its fine, but when i put put another command button in standard and run the same macro in the standard sheet, it displays the values in the standard sheet and not the quote,

any ideas?

  VoG II 18:07 13 Dec 03

As an example you would change:

Range("C3").Select

ActiveCell.FormulaR1C1 = "5"

to

Sheets("name_of_sheet").Range("C3").Value = 5

using the name of the sheet you want to change instead of name_of_sheet

  Tk_RiceZ 18:11 13 Dec 03

Range("C1").Select
ActiveCell.FormulaR1C1 = "7"
Range("C3").Select
ActiveCell.FormulaR1C1 = "14", THERES THE FIRST 4 LINES OF THE CODE, WHAT DO I CHANGE?

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…