LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ll ll is offline
external usenet poster
 
Posts: 67
Default Excel VBA Form error message

Hi,
I am working with a VBA form in Excel, and the code for the form
includes several sub's. In one of the subs, I set variable "c" equal
to the value of "i" which has been looping, so that, at the end of the
loop through the rows, "c" will equal the last row number. I want to
temporarily store the value of c in a cell. Here's the code for that:

c = i
Cells(1, 26).Value = c

Next, in the same form code, but another sub, I want to assign the
value in the previously mentioned cell (plus 7) to variable "i". See
code below:

i = Sheet1.Cells(1, 26).Value + 7

The problem is that I'm getting an error message that points to the
line in the first sub <Cells(1,26).Value=c. Is there a problem with
syntax, etc?

Thanks,
Louis

 
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
excel error message excelista Excel Discussion (Misc queries) 2 May 24th 07 04:04 PM
Excel error message ??? Blueboy969 Excel Worksheet Functions 0 September 23rd 05 07:16 PM
Excel XP error message Run Time Error 91 Lenny[_3_] Excel Programming 1 March 3rd 05 10:15 PM
setfocus on multipage tab form gives error message Cheryl Excel Programming 3 July 28th 04 03:07 PM
Status Message User Form in Excel '97 Brad[_11_] Excel Programming 2 December 12th 03 07:57 PM


All times are GMT +1. The time now is 11:52 PM.

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

About Us

"It's about Microsoft Excel"