Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Works on the trial verson of excel 2007 but not my student version

this is a weird one ...

I was playing around with the trial verson of Excel 2007 on my computer at
home and created a way to help my boss at work. When I put it on my laptop
(running the student verson of excel 2007) it worked fine the first couple of
times I ran it. When it came time to actually show it to the boss it kept
saying that there was a code break after each of my "IF" statements and when
I was haveing the program change the cell sizes... Any ideas why this would
run just fine on the trial version but not on the student one? ... If I can
get it to work and my boss likes it we will be running it on the Business
version, should I be prepared for more problems then?

Thanks in advance,
Gabriel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Works on the trial verson of excel 2007 but not my student version

Hard to tell from the code you posted.


"ACyberPoet" wrote in message
...
this is a weird one ...

I was playing around with the trial verson of Excel 2007 on my computer at
home and created a way to help my boss at work. When I put it on my laptop
(running the student verson of excel 2007) it worked fine the first couple
of
times I ran it. When it came time to actually show it to the boss it kept
saying that there was a code break after each of my "IF" statements and
when
I was haveing the program change the cell sizes... Any ideas why this
would
run just fine on the trial version but not on the student one? ... If I
can
get it to work and my boss likes it we will be running it on the Business
version, should I be prepared for more problems then?

Thanks in advance,
Gabriel



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Works on the trial verson of excel 2007 but not my student ver

sorry its a rather long thing ... Heres one of the chunks that keep getting
errors ...

Worksheets("order").PageSetup.Orientation = xlLandscape
With Columns("A:A")
.NumberFormat = "0"
.ColumnWidth = 12.57
End With
Columns("B:B").ColumnWidth = 39.57
Columns("C:C").ColumnWidth = 29.14
With Columns("D:D")
.ClearContents
.ColumnWidth = 5.43
End With
Columns("E:E").ColumnWidth = 4.14
Columns("F:F").ColumnWidth = 4.71
With Columns("G:G")
.NumberFormat = "$#,##0.00"
.ColumnWidth = 6.71
End With
End Sub

in this one it errors on the first column width change...

Range("A1").Select
Do While ActiveCell.Value < ""
ActiveCell.Offset(0, 6).Select
If ActiveCell.Value = "" Then
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
Else: ActiveCell.Offset(1, -6).Select
End If
Loop
Range("A1").Select
End Sub

and this is one of the "IF" errors that I keep getting

any help is greatly appreciated

"JLGWhiz" wrote:

Hard to tell from the code you posted.


"ACyberPoet" wrote in message
...
this is a weird one ...

I was playing around with the trial verson of Excel 2007 on my computer at
home and created a way to help my boss at work. When I put it on my laptop
(running the student verson of excel 2007) it worked fine the first couple
of
times I ran it. When it came time to actually show it to the boss it kept
saying that there was a code break after each of my "IF" statements and
when
I was haveing the program change the cell sizes... Any ideas why this
would
run just fine on the trial version but not on the student one? ... If I
can
get it to work and my boss likes it we will be running it on the Business
version, should I be prepared for more problems then?

Thanks in advance,
Gabriel




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Works on the trial verson of excel 2007 but not my student ver

The first snippet does not tell me too much without knowing what the error
message was.

One thing that I notice in the second snippet is that you change the
ActiveCell in mid loop, then attempt to bring the cursor back to the
starting column. It is a little cumbersome, but I understand the logic.

This could be written as a For...Next loop to do what you want.

Dim lr As LOng
'Find last row with data in col A
lr = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
'Set the limits for the range to check
For i = lr To 2 Step - 1
'Check value in Column G
If ActiveSheet.Cells(i, 7) = "" Then
Rows(i).Delete 'Delete the row
End If
Next
End Sub

This eliminates the Select method and cuts out the flicker and flash. This
assumes that column A has contiguous data beginning in row 2 for as many
rows until the last cell with data in that column. It works from the bottom
of the range to the top because the default shift is up and can cause skips
if it works downward. I mention this because your original code used Do
While value not "". That method would stop at the first blank cell, but the
For... next loop will not.




"ACyberPoet" wrote in message
...
sorry its a rather long thing ... Heres one of the chunks that keep
getting
errors ...

Worksheets("order").PageSetup.Orientation = xlLandscape
With Columns("A:A")
.NumberFormat = "0"
.ColumnWidth = 12.57
End With
Columns("B:B").ColumnWidth = 39.57
Columns("C:C").ColumnWidth = 29.14
With Columns("D:D")
.ClearContents
.ColumnWidth = 5.43
End With
Columns("E:E").ColumnWidth = 4.14
Columns("F:F").ColumnWidth = 4.71
With Columns("G:G")
.NumberFormat = "$#,##0.00"
.ColumnWidth = 6.71
End With
End Sub

in this one it errors on the first column width change...

Range("A1").Select
Do While ActiveCell.Value < ""
ActiveCell.Offset(0, 6).Select
If ActiveCell.Value = "" Then
ActiveCell.EntireRow.Select
Selection.Delete Shift:=xlUp
Else: ActiveCell.Offset(1, -6).Select
End If
Loop
Range("A1").Select
End Sub

and this is one of the "IF" errors that I keep getting

any help is greatly appreciated

"JLGWhiz" wrote:

Hard to tell from the code you posted.


"ACyberPoet" wrote in message
...
this is a weird one ...

I was playing around with the trial verson of Excel 2007 on my computer
at
home and created a way to help my boss at work. When I put it on my
laptop
(running the student verson of excel 2007) it worked fine the first
couple
of
times I ran it. When it came time to actually show it to the boss it
kept
saying that there was a code break after each of my "IF" statements and
when
I was haveing the program change the cell sizes... Any ideas why this
would
run just fine on the trial version but not on the student one? ... If I
can
get it to work and my boss likes it we will be running it on the
Business
version, should I be prepared for more problems then?

Thanks in advance,
Gabriel






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trial version of 2007 Excel not working sdlizard New Users to Excel 1 July 7th 08 07:22 PM
Uninstall trial verson Excel 2007 Kelbanker Excel Discussion (Misc queries) 5 June 5th 08 10:48 AM
download trial version excel 2003? can only find trial version 200 susan Excel Discussion (Misc queries) 2 November 7th 07 03:19 AM
Trouble uninstalling Excel 2007 Trial version quizmaster Setting up and Configuration of Excel 0 August 11th 07 04:50 PM
How do I start the free trial version of Excel 2007 after I have . sojewels Excel Discussion (Misc queries) 0 May 29th 07 06:27 PM


All times are GMT +1. The time now is 04:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"