Replicating Code!!!

Hi there folks,

I am currently creating a student achievement spreadsheet and I a
using ticks in each cell to state if the student has passed the unit o
not.

I am using a simple VBA code to have any cell, within a specifie
range, ticked upon selecting it. If the cell within the specifie
range, already has a tick, the code will remove it. The trick to th
code is the use of the letter "a" in a cell that has had it's fon
formatted to marlett!!

My code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("C13:AB13")) Is Nothing Then
Target.Font.Name = "Marlett"
If Target = vbNullString Then
Target = "a"
Else
Target = vbNullString
End If
End If
End Sub

The code I am using presently works only on range C13:AB13 (i.e. on
horizontal row). However, I am looking at coping the formula down th
rows (i.e. C14:AB14, C15:AB15.............)

I have attempted to copy and paste the initial formula and ad
different parameters but to no avail. What am I doing wrong?

Mar

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

0
9/3/2004 1:04:41 PM
excel 39879 articles. 2 followers. Follow

1 Replies
819 Views

Similar Articles

[PageSpeed] 7

If I understand correctly, you just want to expand the range.

If Not Intersect(Target, Range("C13:AB13")) Is Nothing Then
could become:
If Not Intersect(Target, Range("C13:AB999")) Is Nothing Then



"stevie_ray <" wrote:
> 
> Hi there folks,
> 
> I am currently creating a student achievement spreadsheet and I am
> using ticks in each cell to state if the student has passed the unit or
> not.
> 
> I am using a simple VBA code to have any cell, within a specified
> range, ticked upon selecting it. If the cell within the specified
> range, already has a tick, the code will remove it. The trick to the
> code is the use of the letter "a" in a cell that has had it's font
> formatted to marlett!!
> 
> My code:
> 
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> If Target.Cells.Count > 1 Then Exit Sub
> If Not Intersect(Target, Range("C13:AB13")) Is Nothing Then
> Target.Font.Name = "Marlett"
> If Target = vbNullString Then
> Target = "a"
> Else
> Target = vbNullString
> End If
> End If
> End Sub
> 
> The code I am using presently works only on range C13:AB13 (i.e. one
> horizontal row). However, I am looking at coping the formula down the
> rows (i.e. C14:AB14, C15:AB15.............)
> 
> I have attempted to copy and paste the initial formula and add
> different parameters but to no avail. What am I doing wrong?
> 
> Marc
> 
> ---
> Message posted from http://www.ExcelForum.com/

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
9/3/2004 4:30:48 PM
Reply:

Similar Artilces:

Replication
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C3B410.C2879E10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I was told that Exchange 2003 has store replication a feature "out = of the box" that I would like to confirm. The company I work for is looking for a DR / BC plan. We are = evaluating software that will allow us to REAL TIME replicate the data = on one exchange server, to a standby server so that in the event of a = disaster, all we have to do is activate the standby server and we wil...

Filter Form Code
I have a form with 12 subforms on it that I use to filter my data by a specific year. I have 1 subform for each month. The users will then be able to choose a specific year from my combo box in the main forms header. Then the subforms are filtered to that year. This is the code I'm using in the after update event of my combo box. Is there a way to simplify this code instead of making it so repetitive? Dim MyRecSet As Object Dim MyRecSet1 As Object Dim MyRecSet2 As Object Dim MyRecSet3 As Object Dim MyRecSet4 As Object Dim MyRecSet5 As Object Dim MyRecSet6 As Object Dim MyRecSet7 As O...

Replication
We started replication on the hq database and are getting errors when we run the 401's on the customer and shipto tables. It seems to be picking up the replication column. Invalid column name 'msrepl_trn_version' anyone been succesfull with replication. any help would be greatly appreciated thanks hi Markd, Don't mind but if you have done this in live enviornment then it is worng, first of all no where it is written that it support the replication technology, I know i have put the replication script on the newsgroup for the store operation only becuase I have been us...

code 646
I received updates on my computer. I tried to install update and code 646 came up, what do I do to override the code/ I have tried to install updates again and again and still get code 646... Help ...

Conditional Formatting Code
I recorded this code but I need it to do more and work a little differently. I need it to first remove any existing "Conditional" formatting. Not all formatting, just remove the existing conditional formatting. I then need to add the conditional formatting as detailed below. Also, my intent was to copy the formatting from the first cell into others. I need it to do all this with out selecting (.Select). Please help. Sheets("Travel").Range("R7:R8").Select Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _ "=(IF...

VBA codes question
Hi, I just write down some VBA codes for an application. What I need is extract some data from a selected area by mouse left-button. So what should I do ? The most I concerned is how to get the Range object of the shadow area selected by mouse. Thanks. ...

Public Folder Replication error #4
We have windows 2000 domain, exchange 20003 running on windows 2003 member server, we have to windows 2000 sites, all AD replication is OK, but only public folder replication did not happen, between two servers, I am getting following NT event application event error EVENT ID 3093 Error -1603 reading property 0x36010003 on object type tbtFolder from database "First Storage Group\Public Folder Store Also I have following event 3085 Error 0x8004010f occurred while generating an outgoing replication message. Type: 0x4 Folder: (7-3ABC) Database "First Storage Group\Pub...

Copy and close code
Hi, I have a worksheet which uses an indirect formula to search through a series of files/sheets based on an address to return a value from cell AE20. Once the data has been copied for all the previous days I would like a copy/paste values to occur to replace any of the values returned by the formula. In AU10:AU381 there is a 1 or 0 for each row. 1 meaning that a copy/pastevalues can be performed (decided by if the date is < today), and zero if i need to keep the formulas. Is it possible to have a copy/paste values code for only sheets 2-4 which works when the file is...

Cannot Save VBA Code
Hello: A client's only "workstation" is a Terminal Services box. I'm trying to save some simple VBA code for a customization. When I hit "Save", I get a message saying "cannot save either because other users are in the system or because the file is read-only". Neither possibility is the case. A former co-worker of mine once told me that this is a Terminal Services issue. I cannot remember if he ever said whether there is a solution. It didn't sound like it. No one is in the system and I even stopped and started the SQL Server. I cannot r...

Error Code 646 on MS Office Updates Only
I have now accumulated 5 updates which repeatedly fail. They are: KB978382 - Excel 2007 KB976321 - Office 2007 KB978380 - Office 2007 KB980729 - OneNote 2007 KB981715 - Office 2007 OS (Windows 7) updates seem to install correctly, as do updates for any drivers. Have tried both auto and manual update installs .... have tried one at a time and all at once ... Nothing seems to correct the situation. Any ideas? Any ideas? -- JR// Insert your Office CD into your computer while the Updates are trying to install. If you have read some of the posts here ,then you would hav...

Microsoft Publisher 2002
Hi. I bought publisher 3 years ago and installed on my desktop and daughters laptop. Everything was fine until my daughter completely trashed her laptop with a virus and i had to reload everything. When i came to reload publisher i couldn't find the original case with the certificate number on it - and now it won't authenticate and therefore load. How can i restore this programme? Will the certificate number be on my desktop somewhere? Any ideas gratefully received. Thanks, Neil I can't really tell by your post but I will assume that you did a complete reformat and not jus...

Color Coding by Condition
Excel 2000 Is there a way to color-code a row based on a condition of one cell in that row, but not using Visual Basic Editor? Conditional formatting would be perfect except I am only allowed 3 conditions. I have a column containing several different numbers and I am trying to color code groups of numbers which would require more than 3 conditions. There are approximately 100 or so different numbers and a total of 8 colors (conditions). I'm not an expert at all in Excel and if Visual Basic Editor is needed then I would need some step by step guidance with it. I appreciate any help! Th...

Help please
After a failed update to SQL 2008 SP1 + CU8, I restored master, and then tried to do a repair on the install to make sure I was back to SP1 only. I now get the following error: SQL Server 2008 - Developer Edition x64 Windows Server 2008 R2 x64 There was an error executing the Replication upgrade scripts TITLE: Microsoft SQL Server 2008 Setup ------------------------------ The following error has occurred: There was an error executing the Replication upgrade scripts. See the SQL Server error log for details. For help, click: http://go.microsoft.com/fwlink?LinkID=204...

IMAP replication
Hi all, First post to this newsgroup. I am wondering if it is possible to have Exchange sync itself with an IMAP server. We have an in house Exchange server that is used to manage Contacts, Calendars, and Tasks, however mail is handled by an external IMAP server. The ideal solution would be to have the two kept in sync, so any changes made on the Exchange server would reflect on the IMAP server and vice versa for each user. Is this just a pipe dream? Thanks, Hamlesh Motah. : We have an in house Exchange server that is used to manage : Contacts, Calendars, and Tasks, however mai...

Invalid product key-code
Good morning, Starting from an application “VB6” our software has generated an excel file through the creation of the object “Excel Application”(Code: CreateObject “Excel.Application”). Since today we never had any kind of problem about that, but some days ago the software has begun to give a message error “Good morning, Starting from an application “VB6” our software has generated an excel file through the creation of the object “Excel Application”(Code: CreateObject “Excel.Application”). Since today we never had any kind of problem about that, but some days ago the software has begun t...

simple code not working
this code bit has been working forever. recently had a virus & had to reinstall microsoft office 07. now it won't work. i'm assuming there's some wording difference it's looking for - can anybody help me out? thanks. susan ++++++++++++++++++++++++++++++++++++++ ThisWorkbook.Worksheets("Indirect Costs").Select With Worksheets("Indirect Costs") .Range("a1").Select End With ++++++++++++++++++++++++++++++++++++++ i also tried the following which stops on "Activate": With ThisWorkbook With Worksheets("Indi...

public folder replication!!!!!!!!!!!
Is there a while paper out there on the proper way to setup replication of public folders between 2 window2003 exchange servers. Thanks "jon" <jgreen@alro.com> wrote: >Is there a while paper out there on the proper way to >setup replication of public folders between 2 window2003 >exchange servers. "proper" depends on what you want to do. Are you wanting to have a replica of every folder on both servers? If so, use the pfmigrate.wsf program on the E2K3 CD. -- Rich Matheisen MCSE+I, Exchange MVP MS Exchange FAQ at http://www.swinc.com/resource/exch_f...

Replicate Phone Message Form from Lotus Notes
Can you give me any suggestions for creating a phone message template. I have created forms in Word where you use a table and can type in information or use check boxes and can tab to the various fields. In this message form I would like to have multiple check boxes with different words after it like Telephoned, Please Call, Etc. and also a space for the Contact Name, and Phone Number. Lotus Notes has a form exactly like this. Any ideas on how to create this in Outlook. I tried copying it from Word but couldn't get it to work. Thanks. ...

Insert a code
Hello I have an excel file with 31 sheets and I have a code where I want to insert it in these sheets. How can I write this code once and appears in all the 31 sheets. Thanks in advance. Hi Max What code or action do you want to perform on your 31 sheets? If you post the code or give a bit more detail someone will be able to help. Take care Marcus ...

Replicating Mailboxes
How do I replicate specific mailboxes between two Exchange servers in the same AD Tree. The servers are in two different Physical locations linked by VPN (2MB) I have Exchange 2000 Enterprise on Bothe servers. Nash On Wed, 20 Apr 2005 04:41:02 -0700, El Tel <ElTel@discussions.microsoft.com> wrote: >How do I replicate specific mailboxes between two Exchange servers in the >same AD Tree. The servers are in two different Physical locations linked by >VPN (2MB) > >I have Exchange 2000 Enterprise on Bothe servers. > >Nash You cannot replicate mailboxes. You can r...

Zip Code Query
I am working with two tables. Each table contains a field for a zip code. Table A has an 11 digit zip code and Table B has an 11 digit zip code. I currently run a join query to capture all matching records. Table B also has zip codes less than 11 digits. I am trying to write a query which will take each zip code less than 11 digits and match on the length of the string to Table B. The string length can be between 5 and 9 digits. If there a way to do this? Thanks, Mike You can use LIKE in the ON clause of the join: SELECT tableA.zip, tableB.zip FROM tableA INNER JOIN tableB ON ...

how to do this bit of code better?
Hello All If Me.SRServRepWOValid = True Then If IsNull(Me.PONumber) Then MsgBox "Has the Customer issued a Purchase Order for the service?" Me.PONumber.SetFocus Else If IsNull(Me.WorkOrderNumber) Then MsgBox "Service Reports cannot be submitted with out a work order.", vbOKOnly, "Work Order Required" Me.WorkOrderNumber.SetFocus Else If IsNull(Me.ReasonForCall) Then MsgBox "What was the reason for the service ca...

what is error code 80072EFD and how to fix it
Since October 2009 I have not been able to update Windows vista,did not have a problem before,it has started when I moved and started with a different internet provider.Everytime I try to update it will show an error code 80072EFD.Tried to google it but I could not find any answer.Pleeeeese help.thank you Always state your full Windows version (e.g. Vista SP1; Vista 64-bit SP2) when posting in a forum or newsgroup. Please do so in your next reply. What anti-virus application or security suite is installed and is your subscription current? What anti-spyware applications (other t...

Jet4 and Merge Replication on 2005
I have experienced problems when using Jet4 linked tables and Merge Replication on SQL Server 2005. I have not been able to find a resolution to this except to use SQL Server 2000, and this was two years ago. The basic problem is when I insert a new record into an MS-ACCESS table, all the fields (which should be blank on a new record) appear to contain data from a previous record in that table. Refreshing the dataset 'fixes' this so that you see the blank record you added. The more subscriptions I have, the more salient the problem (occurs more often). Microsoft Support conc...

Incomplete Public Folder Replication
I'm running Exchange 5.5 on NT4/2000. I'd like to phase out a 5.5 box on NT4. I already migrated the mailboxes from that box to a new one running 2000 in the same Site. What's left are the Public Folders. So for that I've set up replication from the NT4 to the new 2000 box. After waiting a couple of days and checking if al folders have an in-sync replica, I found out that a whole bunch of folders, never got replicated. Reenabling them for replication, doesn't have any effect. Basically I'm stuck with an automatic process, that get's cut off with no means possible ...